Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. dim condition as integer
  2. dim rndstring as String
  3. condition = 1 ' something here to fill the condition with 1, 2 or 3 depending on choice of radio button
  4.  
  5. If condition = 1 Then
  6. 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)))
  7. else If condition = 2 Then
  8. 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)))
  9. else then
  10. rndstring = Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200))) & "-" & Cstr(Int ((10000 - 99999 + 1) * Rnd + 200)))
  11. end if
  12.  
  13. 'do something with your rndstring
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement