Message Box using macro

D

Designingsally

Hey Experts

I want to create a message box with three buttons- YES NO and ABORT.

When I click ABORT then macros shd stop running or quit carrying the
operations and return to document.

Is that possible?

Pls reply


Sally
 
M

macropod

Hi Sally,

Try something along the lines of:

Sub Demo()
Dim Response
Response = MsgBox("What do you want destroy the world?", vbYesNoCancel)
Select Case Response
Case vbCancel
End
Case vbNo
MsgBox "Well done", vbExclamation
Case vbYes
MsgBox "Sorry, but that option isn't available today", vbCritical
End Select
End Sub
 
D

Designingsally

Thanks MacroPod. It helped me.
--
I believe in Hope.

DesigningSally


macropod said:
Hi Sally,

Try something along the lines of:

Sub Demo()
Dim Response
Response = MsgBox("What do you want destroy the world?", vbYesNoCancel)
Select Case Response
Case vbCancel
End
Case vbNo
MsgBox "Well done", vbExclamation
Case vbYes
MsgBox "Sorry, but that option isn't available today", vbCritical
End Select
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top