<% 'generate random number Randomize RandomNumber = int(Rnd * 25) +1 'display random number Response.Write RandomNumber %> To change the maximum number just change the number 25 to what you desire. If you press refresh the number will change .