Board index » Visual Studio » What's the command to detect the data type of a variable?
|
DAlexander
|
|
DAlexander
|
What's the command to detect the data type of a variable?
Visual Studio167
Hi Gang, I would like to know what function returns the data type of a particular variable. I'm already familiar with isArray, but haven't had much experience with the function that returns the data type. Can somebody provide an example following this template: ------------------------------------------- If ?(strWhatever) = "String" Then etc... End if ------------------------------------------- Thanks a bundle, Christian Blackburn - |
| Rick
Registered User |
Sun Aug 17 02:21:31 CDT 2003
Re:What's the command to detect the data type of a variable?QuoteI would like to know what function returns the data type of a particular of possible return values). Rick - MVP - |
| Monte
Registered User |
Sun Aug 17 10:12:03 CDT 2003
Re:What's the command to detect the data type of a variable?
In addition to TypeName and VarType, there's also the TypeOf
statement, which works for object types. For instance: If TypeOf theObjRef Is Form Then MsgBox "Hey, I'm a Form" End If +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+ Monte Hansen - MVP VB KillerVB.com">KillerVB.com +|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+ "Christian Blackburn" <Christian@Damn@Spam@Hotmail.com>wrote in message news:euu4uUIZDHA.384@TK2MSFTNGP12.phx.gbl... QuoteHi Gang, |
| Christian
Registered User |
Sun Aug 17 15:53:38 CDT 2003
Re:What's the command to detect the data type of a variable?
Dear Rick, Eduardo, and Monte,
Thank you all very much for the hell I'll research these function they all will undoubtedly be of use to me. Cheers, Christian "Monte Hansen" <monte@nospam.com>wrote in message QuoteIn addition to TypeName and VarType, there's also the TypeOf - |
