Check the variable type: integer and integer array : varType « Data Type « VBA / Excel / Access / Word






Check the variable type: integer and integer array

 

Sub ArrayTest3()

    Dim intNum1 As Integer
    Dim intNum(1 To 10) As Integer

    Debug.Print "Array: " & (VarType(intNum1) > vbArray),
    Debug.Print "Type: " & (VarType(intNum1) And Not vbArray)
    Debug.Print "Array: " & (VarType(intNum) > vbArray),
    Debug.Print "Type: " & (VarType(intNum) And Not vbArray)

End Sub

 








Related examples in the same category

1.Check the variable type
2.The variable type of an array and an integer
3.Values returned by the VarType function