|
-
Jan 5th, 2002, 07:09 PM
#1
Thread Starter
Frenzied Member
Converting String to a number
I'm writing a pogram, a simple one that calculates certain number -which works like this...
User enters any number in a textBox
and on click of the command button the number should be incremented by 1.
Its working but if I enter 001 into textbox it returns 2 on clicking command1...please help...I want it to be 002
Here's my code:
Dim nu As Long
nu = Val(Text1.Text)
MsgBox nu
-
Jan 5th, 2002, 07:11 PM
#2
PowerPoster
Hi
Just format the output Text1.Text = format$(2,"000")
Regards
Stuart
-
Jan 5th, 2002, 07:35 PM
#3
PowerPoster
Re: Circular Reference Problem
You lost there Marty???
-
Jan 6th, 2002, 01:48 PM
#4
beachbum: Just goes to show you that even Moderators make mistakes I meant to start a new thread but I replied instead. I've now split it off into its own thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|