Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate random number and pipe out to a file 1

Status
Not open for further replies.

lpb71

Technical User
Mar 10, 2004
57
0
0
GB
I need help creating part of my script.

I want it to generate a random number between 245 and 254 then pipe this mumber into a string value

Any help would be greatly appreciated.
 
Well, from 245 inclusive to 254 exclusive is 9, so:
a = RND * 9
a = a + 245
a$ = STR$(a) 'convert to a string
 
Tried this, it generates number 251 all the time. Any further ideas ?.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top