' To check the Variable type using Vb Scripts
'vbArray
myArray = Array(20)
If VarType(myArray) And vbArray Then MsgBox " Array Variable"
'vbBoolean
myBoolean = True
If VarType(myBoolean) And vbBoolean Then MsgBox "Boolean Variable"
'vbnull
myNull = Null
If VarType(myNull) And vbNull Then MsgBox "Null Variable"
'vbEmpty
myEmpty = Empty
If VarType(myEmpty) And vbEmpty Then MsgBox "Empty Variable"
'vbDecimal
myDecimal = 23.23423
If VarType(myDecimal) And vbDecimal Then MsgBox "Decimal Variable"
VbInteger
myInteger = 123
If VarType(myInteger) And vbInteger Then MsgBox "Integer Variable"
'vbCurrency
myCurrency = 23323
If VarType(myCurrency) And vbCurrency Then MsgBox "Currency Variable"
vbSingle
mySingle = 2.344
If VarType(mySingle) And vbSingle Then MsgBox "Single Variable"
VbDouble
myDouble = 92349.3405034
If VarType(myDouble) And vbdouble Then MsgBox "Double Variable"
VbLong
myLong = 1243242343423#
If VarType(myLong) And vbLong Then MsgBox "Long Variable"
VbDate
MyDate = Date
If VarType(MyDate) And vbDate Then MsgBox "Date Variable"
No comments:
Post a Comment