Hey there again!
Now that you kinda sorta know how to call a function and then make it do somethign, lets see about calling a function that will call many functions, each of which does something different. Here is what to do:
A) get back into your module and add the following code:
Public Function CallAllRandoms( ) As Integer
Random1( )
Random2( )
Random3( )
Random4( )
Random5( )
End Function
Public Function Random1( ) As Integer
Dim q As Integer
q = Int(Rnd( ) * 5)
Return q
End Function
Public Function Random2( ) As Integer
Dim z As Integer
z = Int(Rnd( ) * 5)
Return z
End Function
B) get back into form1, and then doubleclick the button that says "Call Many Functions", and add this code to it:
CallAllRandoms()
Label1.Text = Random1( )
Label2.Text = Random2( )
Cheers,
Mr. L
Sunday, November 2, 2008
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment