Link to home
Start Free TrialLog in
Avatar of Saqib Husain
Saqib HusainFlag for Pakistan

asked on

Excel VBA typeof for string variable

I want to check a variable using typeof. It would either be a collection or a string

    If TypeOf mmbr Is Collection Then
   
    Elseif typeof mmbr is string then

the first one works but the second one does not.

If I use typename() instead of typeof then it works.

What would be the syntax for the string part for typeof?
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Saqib Husain

ASKER

Thanks