View Full Version : Msgbox


geno
04-29-2001, 12:35 PM
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?

mrabrams
04-29-2001, 03:39 PM
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