papa_k
09-02-2003, 10:26 AM
dim intVersion as integer
intVersion = 1 * 100000
what is wrong with the above? When i run it i get the error that there has been an overflow!! why? What is wrong with it?
Thinker
09-02-2003, 10:28 AM
The range of Integers is -32768 to +32767. Try using a Long.
papa_k
09-02-2003, 10:34 AM
The range of Integers is -32768 to +32767. Try using a Long.
ok, you got me there.
i have tries long and i have not solved the problem.
dim lngCurrentVersion as long
dim lngActualVersion as long
lngCurrentVersion = (App.Major * 100000) + (App.Minor * 10000) + App.Revision
lngActualVersion = rstSRDBVersion.Fields(0).Value
where
app.major = 1
app.minor = 4
app.revision = 4917
anythoughts?
Robse
09-02-2003, 10:39 AM
What are you trying to do?
papa_k
09-02-2003, 10:42 AM
What are you trying to do?
trying to get the version number of the software into a version variable in the form
144917
where the actual version number is 1.4.4917
Just make it a string so you can concatenate them all together and then convert it bcak to a number.
Dim version As Long
version = CLng(App.Major & App.Minor & App.Revision)
MsgBox "Version: " & version
papa_k
09-02-2003, 10:58 AM
Just make it a string so you can concatenate them all together and then convert it bcak to a number.
Dim version As Long
version = CLng(App.Major & App.Minor & App.Revision)
MsgBox "Version: " & version
your a star cheers.
CLOSED