vba string to number code example
Example 1: vba string to integer
MsgBox CInt("7,55") ' Integer -> 8
MsgBox CLng("7,55") ' Long -> 8
MsgBox CDbl("7,55") ' Double -> 7,55
Example 2: excel-vba make integer
Public Function MakeInteger%(LoByte As Byte, HiByte As Byte)
If HiByte And &H80 Then
MakeInteger = ((HiByte * &H100&) Or LoByte) Or &HFFFF0000
Else
MakeInteger = (HiByte * &H100) Or LoByte
End If
End Function