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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -