To make random number using function vb6 follow this step :
1. Make 1 button (default = command1)
2. Make 1 textbox (default = text1.text)
3. Then Paste Code Bellow
Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function
Private Sub Command1_Click()
Text1.Text = Rand(1, 99)
End Sub
Note : this function random number make number random from number 1 to number 99
Good luck may be helps you to
0 comments:
Posting Komentar