DIAdem Help

VBScript constant: vbNull

  • Updated2024-09-12
  • 1 minute(s) read

VBScript constant: vbNull

Provides a constant for the Null data type for the VarType method.

Object.vbNull
ObjectVBS
The constant belongs to the VBS functionality. You do not need to specify this object.
Object.vbNullVariant with read access
vbNull has the value 1.

The following example determines the type of the MyVar variable:

Dim MyVar
MyVar = Null
Select Case VarType(MyVar) 
Case VBEmpty
  Call MsgBox("Empty")
Case VBNull
  Call MsgBox("Null")
Case VBInteger
  Call MsgBox("Integer")
Case vbLong
  Call MsgBox("Long")
Case vbSingle
  Call MsgBox("Single")
Case vbDouble
  Call MsgBox("Double")
Case vbCurrency
  Call MsgBox("Currency")
Case vbDate
  Call MsgBox("Date")
Case vbString
  Call MsgBox("String")
Case vbObject
  Call MsgBox("Object")
Case vbError
  Call MsgBox("Error")
Case vbBoolean
  Call MsgBox("Boolean")
Case vbDataObject
  Call MsgBox("DataObject")
Case vbByte
  Call MsgBox("Byte")
Case vbArray + vbVariant
  Call MsgBox("Variant Array")
End Select