View Full Version : Solved: Changing String to Integer
Marcke
11-18-2008, 09:37 AM
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?
Kenneth Hobs
11-18-2008, 09:46 AM
Use CInt.
e.g.
Sub test()
Dim s As String, i As Integer
s = "12345"
i = CInt(s) + 1
MsgBox i
End Sub
Marcke
11-18-2008, 09:48 AM
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
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.