Example - CInt Function

  1. Sub Main ()

    1. Dim y As Long

      y = 25

      If VarType(y) = 3 Then

      1. MsgBox "y with a value of " & y & " has a variable type of " & VarType(y) & "."

        x = CInt(y) 'Converts the Long value of y to an integer value in x

        MsgBox "x with a value of " & x & " has a variable type of " & VarType(x) & "."

      End If

    End Sub