Jun 9, 2003 #1 bungpeng Senior Contributor Joined Sep 10, 2002 Messages 906 Location Malaysia How do I check the data type of my object? like String, Integer...
Jun 9, 2003 #2 bungpeng Senior Contributor Joined Sep 10, 2002 Messages 906 Location Malaysia OK, I just get it in MSDN Help, use: If TypeOf myObject Is String then ...... End If Click to expand... Now another question is, can I use "Select Case" for TypeOf? How to do? because there are too many possibilities of data type, right?
OK, I just get it in MSDN Help, use: If TypeOf myObject Is String then ...... End If Click to expand... Now another question is, can I use "Select Case" for TypeOf? How to do? because there are too many possibilities of data type, right?
Jun 9, 2003 #3 M mutant Ultimate Contributor Joined Jan 19, 2003 Messages 1,771 Location Enfield, CT, USA You would have to use if...elseif for that. You can however use SelectCase to return a boollean about the object: Visual Basic: Select Case TypeOf r Is String Case true 'is a string Case false 'is not a string End Select
You would have to use if...elseif for that. You can however use SelectCase to return a boollean about the object: Visual Basic: Select Case TypeOf r Is String Case true 'is a string Case false 'is not a string End Select
Jun 9, 2003 #4 bungpeng Senior Contributor Joined Sep 10, 2002 Messages 906 Location Malaysia This is not what I want, it will make a lot of coding in my program.... you mean I can only use "if ... elseif...." for all the possible data type?
This is not what I want, it will make a lot of coding in my program.... you mean I can only use "if ... elseif...." for all the possible data type?