Msgbox (1 Viewer)

geno

Registered User.
Local time
Today, 09:12
Joined
Jun 19, 2000
Messages
243
I've been given a challenge to create the following: On a form, I have a text box named txtCount where I can enter a number. In Click event to do the following:
· When I click on the txtbox a message box will appear. The message box will have one button that says OK .
· The message box will have an icon that says !Warning.
· You will have to click on OK the same number of times as the number in the text box txtCount before it will close.

Can anyone help?
 
M

mrabrams

Guest
This is not EXACTLY what you asked for, but it is close. You can probably modify it a bit to get it perfect.

Private Sub txtCount_Click()
Dim x as Integer

x = txt.Text
Do While x > 0

MsgBox "Click a total of " & x & " times", 16
x = x - 1
If x = 0 Then Exit Sub
Loop
End Sub

Michael Abrams
 

Users who are viewing this thread

Top Bottom