I have a function which has several optional arguments.
These arguments are either forms or controls.
I need to test for how many of the optional arguments were passed.
I can't use IsMissing because they aren't Variants.
If I make the optional arguments variants I get a "ByRef argument type mismatch" error.
If I keep them as forms / controls, I cannot come up with a test for when they are missing:
IsNull always returns false
IsMissing always returns false
="" or =0 gives an "object variable or with block variable not set".
So how do I test for whether an optional form/control argument has been passed?
Any help greatly appreciated!
These arguments are either forms or controls.
I need to test for how many of the optional arguments were passed.
I can't use IsMissing because they aren't Variants.
If I make the optional arguments variants I get a "ByRef argument type mismatch" error.
If I keep them as forms / controls, I cannot come up with a test for when they are missing:
IsNull always returns false
IsMissing always returns false
="" or =0 gives an "object variable or with block variable not set".
So how do I test for whether an optional form/control argument has been passed?
Any help greatly appreciated!