chungyin383
New Member
- Joined
- Dec 31, 2016
- Messages
- 5
I am building a simple lucky draw Excel.
I have a user form with 2 buttons: start and stop. When "start" is clicked, a number is drawn and displayed (this part is done) and this is continued until the user clicks "stop" (This is the part I don't know how to implement).
Any ideas on how to make it?
What I have right now:
I have a user form with 2 buttons: start and stop. When "start" is clicked, a number is drawn and displayed (this part is done) and this is continued until the user clicks "stop" (This is the part I don't know how to implement).
Any ideas on how to make it?
What I have right now:
Code:
Private Sub start_button_Click()
Do While True
label1.Caption = Application.WorksheetFunction.RandBetween(1, 100)
form1.Repaint
Loop
End Sub