Randomize Numbers

Results 1 to 2 of 2

Thread: Randomize Numbers

  1. #1
    Unni Krishnan Guest

    Default Randomize Numbers

    How do i generate a random number between 1-5 everytime a person comes to a particular page.If a person is already logged in , the the next person should get another number.Based on these numbers i have to sort my search criteria.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Randomize Numbers

    Use this code, note that you should only use the Randomize reserve word once per page, although you can make as many random numbers as you like once you have used it, using the Rnd function like so:<BR><BR>&#060;%<BR>&#039Do only once per page<BR>Randomize<BR><BR>MyVar = Int(5 * Rnd + 1)<BR><BR>%&#062;<BR><BR>Hope that helps<BR><BR>Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts