From one of VBA tutorials I learned that variables contining numbers should be firstly declared as integers:
Dim mynumber as integer
But, please, look at this code:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."
MsgBox strMsg
End Sub
No variables are declared here as integer, but it still works just fine. Why is it so?