|
-
Mar 30th, 2000, 07:16 PM
#1
Thread Starter
Hyperactive Member
I have two short queries. I tried a search on the VB database, but didn't have much success.
The following code gives me a random number between 0 and 10 in my textbox:
Private Sub Form_Load()
Randomize
Text1 = Int(Rnd * 10)
End sub
How can I exclude the number zero from appearing?
Secondly, I want to add the letter 'X' onto the number that appears in the text box. I thought it was simply a case of:
Label2.caption = Int(Rnd * 10) + "X".
But it didn't work.
Any help on these issues would be greatly appreciated.
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
|