VB 4 U - Create Random Messages with VB!

Metacafe Affiliate U
Added by Metacafe Affiliate U Subscribe 952
Published 6 Sep 2009
65
••• More
Report video
0 0
You have already voted for this video.
Basically this program creates random message boxes that pop up using arrays.

Before the Form1_Load insert...
Basically this program creates random message boxes that pop up using arrays.

Before the Form1_Load insert code:
Dim Messages(5)

the number can be whatever number you want!

In the Form1_Load code-insert

messages(0) = "[Message that you want to show up]

Do this for 0 to 5

in the button1_click code-insert:
dim r as integer
dim message as string
r = int(rnd(my.computer.clcok.localtime.millisecond) * 5)

NOte: The 5 is the number of messages it will randomize to and using the clock will make the message not show up twice.

message = messages(r)
msgbox(message)

and you're done! [Comment & Subscribe]
Categories: How To
Show moreShow less
Report this video as: