echo a random name from a list, vbscript -
i'm new programming, , want make program randomly selects name or sentence list in vb script.
here list
jacob james jason caleb ashlee john
so program need choose random name list
if there help, appreciate it, thanks
there no built-in method require in vbscript. have implement own below.
also, might want check these out:
randomize function randomwithinrange(min, max) randomwithinrange = int((max - min + 1) * rnd() + min) end function function randitemfromarray(arr) randitemfromarray= arr(randomwithinrange(lbound(arr), ubound(arr))) end function dim names names = array("jacob", "james", "jason", "caleb", "ashlee", "john") msgbox randitemfromarray(names)
Comments
Post a Comment