标签:com strong ring box str sub variable href http
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 的插件。
Excel VBA Convert Text String to Number
标签:com strong ring box str sub variable href http
原文地址:https://www.cnblogs.com/emanlee/p/13061406.html