Variant Type:
If no data type is related with the VB variables, it takes the default variant type. The variable x will be of the variant type when the two declarations below are used.
Dim x
Dim x as Variant
A variant type can take string, numeric, date, null or Boolean values.
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As
Single)
Dim i As Integer
Dim j As Long
Dim a As Single
Dim b As Double
Dim c As Single
Dim c1 As Currency
i = 32767 ' range is upto 32767 beyond that overflow occurs
j = 97400
Form1.Print "integer i is"; i
Form1.Print "long j is"; j
a = 8.97655467787088 '8.976555
b = 0.876554677870879
c = 100000000 '1E+08
c1 = 100000000
Form1.Print "single a is"; a
Form1.Print "double b is"; b
Form1.Print "single c is"; c
Form1.Print "currency c1 is"; c1
End Sub