Convert String to Integer
MsgBox CInt("7.55")
MsgBox CLng("13.5")
Debug.Print "13.5" + "13.5"
Sub Using_Variables()
Dim valueOne As String
valueOne = 5
MsgBox CLng(valueOne) + CLng(valueOne)
End Sub
Convert String to Decimal
MsgBox CDbl("9.1819")
MsgBox CDec("13.57") + CDec("13.4")
Convert String to Currency
ange("A1").Value = CCur("18.5")
REF:
https://www.automateexcel.com/vba/convert-text-string-to-number/
VBE2019,Rubberduck:Excel VBA 的插件。