Skip to content

Instantly share code, notes, and snippets.

@eggist77
Last active July 18, 2021 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggist77/4b0cbe5e408e75a94647f305deff0b6b to your computer and use it in GitHub Desktop.
Save eggist77/4b0cbe5e408e75a94647f305deff0b6b to your computer and use it in GitHub Desktop.
VBA initValue.vb
Sub initValue()
Dim initBoolean As Boolean
Dim initByte As Byte
Dim initInteger As Integer
Dim initLong As Long
Dim initSingle As Single
Dim initDouble As Double
Dim initCurrency As Currency
Dim initDate As Date
Dim initString As String
Dim initVariant As Variant
'Print
Debug.Print "Boolean: " & initBoolean
Debug.Print "Byte: " & initByte
Debug.Print "Integer: " & initInteger
Debug.Print "Long: " & initLong
Debug.Print "Single: " & initSingle
Debug.Print "Double: " & initDouble
Debug.Print "Currency: " & initCurrency
Debug.Print "Date: " & initDate
'String
Debug.Print "String: " & initString
If vbNullString = initString Then
Debug.Print "String: vbNullString"
End If
'Variant
Debug.Print "Variant: " & initVariant
If IsEmpty(initVariant) = True Then
Debug.Print "Variant: Empty"
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment