I am trying to pass a long variable into a ByVal Variant and I am getting a type mismatch error? Any ideas? If I change the type to a Long it works?! Shouldn't the ByVal Variant work also?
Printable View
I am trying to pass a long variable into a ByVal Variant and I am getting a type mismatch error? Any ideas? If I change the type to a Long it works?! Shouldn't the ByVal Variant work also?
Hmm.. Variant should work too, strange.
But I'm not to fond of Variant, whereever you can, use a specified type, so using long in this case is no problem if you're sure it's a number, if not, just pass it a string it'll work even with integers after you used the Val function.
Were is the procedure located? Public or private? paste the procedure call and the declaration of the long variable here, were are they located?
Thanks for the questions kedaman!!!!
I figured it out!