|
-
June 16th, 2001, 04:02 PM
#1
Message Boxes
How do I detect which button was pressed on a Message Box? Such as Yes, No, Cancel, etc...?
-
June 16th, 2001, 06:59 PM
#2
Re: Message Boxes
Dim RET As Integer
RET = MsgBox("HI", vbYesNoCancel)
If RET = vbYes Then Debug.Print "yes"
If RET = vbNo Then Debug.Print "no"
If RET = vbCancel Then Debug.Print "cancel"
David Paulson
-
June 20th, 2001, 05:52 AM
#3
Re: Message Boxes
Select Case MsgBox("Proceed?", vbYesNoCancel)
Case vbYes
'proceed with operation
cAse vbNo
'stop operation
Case vbCancel
'cancel operation
End Select
Same as the other answer but slightly more elegant layout.
HTH,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|