Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dim condition as integer
- dim rndstring as String
- condition = 1 ' something here to fill the condition with 1, 2 or 3 depending on choice of radio button
- If condition = 1 Then
- rndstring = Cstr(Int ((1000 - 9999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((1000 - 9999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((1000 - 9999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((1000 - 9999 + 1) * Rnd + 200)))
- else If condition = 2 Then
- rndstring = Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200)))
- else then
- rndstring = Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200)))
- end if
- 'do something with your rndstring
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement