I'm puzzled about a very simple thing: Changing a Value that's a String to an Integer.
In Delphi it's StrtoInt, but what is it in VBA?
I'm puzzled about a very simple thing: Changing a Value that's a String to an Integer.
In Delphi it's StrtoInt, but what is it in VBA?
Use CInt.
e.g.
[VBA]Sub test()
Dim s As String, i As Integer
s = "12345"
i = CInt(s) + 1
MsgBox i
End Sub[/VBA]
Thank. Message can be changed to Solved now
Hi Marcke,
It's up to you to mark it "Solved". When you open the thread, look right above your first post for the drop-down named Thread Tools; there's a Mark Solved option under it.
Have a great evening,
Mark