I WANT Excel to tell me that I can't multiply a string. What am I missing?
Code:
Option Explicit
Sub why()
Dim myVariable As String
Debug.Print VarType(myVariable), TypeName(myVariable), myVariable
myVariable = 42 'Not "42"
myVariable = myVariable * 3 '126 Why?
Debug.Print VarType(myVariable), TypeName(myVariable), myVariable
End Sub
Last edited: