Answer the question
In order to leave comments, you need to log in
How to assign a random value to a variable from a given list in vbs?
I have a list for example:
January
February
March
April
May
June
July
August
September
October
November
December
How do I make the variable here = a random month from the list?
Is it possible to do this in vbs?
Answer the question
In order to leave comments, you need to log in
Randomize
z=array("January","February","March","April","May","June","July","August","September","October","November","December")
index=int(rnd*12)
if index>11 then index=11
wscript.echo z(index)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question