Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program a message box with a (Yes),( No) buttons
How do I write an instruction in VB to generate a message box that askes for
a yes or no response? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program a message box with a (Yes),( No) buttons
DeJon, here is one way,
Sub Message_box_test() Msg = "Put message here" Title = "Put title here" Response = MsgBox(Msg, vbYesNoCancel + vbQuestion, Title) If Response = vbNo Then 'your code if no is clicked here MsgBox "you clicked no" Exit Sub ' Quit the macro End If If Response = vbCancel Then 'your code if Cancel is clicked here MsgBox "You clicked cancelled" Exit Sub ' Quit the macro End If 'your code if Yes is clicked here MsgBox "you clicked yes" End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "DeJon" wrote in message ... How do I write an instruction in VB to generate a message box that askes for a yes or no response? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program a message box with a (Yes),( No) buttons
Here's a site for message boxes http://www.excel-vba.com/vba-excel-message-box.htm -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=520900 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Program Buttons in EXCEL | Excel Worksheet Functions | |||
Add Message While Program is Working | Excel Programming | |||
How to acknowledge a message box from VB program? | Excel Programming | |||
message box program flow | Excel Programming | |||
message box program flow | Excel Programming |