XL: How to Create Yes and No Buttons for a Custom Message Box (142142)
The information in this article applies to:
- Microsoft Excel 97 for Windows
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 95 7.0a
- Microsoft Excel for Windows 5.0
- Microsoft Excel for Windows 5.0c
- Microsoft Excel for the Macintosh 5.0
- Microsoft Excel for the Macintosh 5.0a
- Microsoft Excel for Windows NT 5.0
This article was previously published under Q142142 SUMMARY
By default, the MsgBox function in a Microsoft Visual Basic for
Applications procedure contains a single OK button. However, you can display other buttons in the message box. This article provides a sample Visual Basic macro that displays a message box with Yes and No buttons; the article also explains how to retrieve the information about which button a user clicks to dismiss the message box.
REFERENCES"Visual Basic User's Guide," version 5.0, Chapter 11, "Displaying
Information with the MsgBox Function"
For more information about displaying a message box in a macro in
Microsoft Excel, version 7.0, 97 or Excel 98 Macintosh Edition, click Answer Wizard on the Help menu and type:
tell me about a message box
For more information about displaying a message box in a macro in
Microsoft Excel version 5.0, choose Programming with Visual Basic, choose Search and type:
For additional information about getting help with Visual Basic for
Applications, please click the article number below to view the article in the Microsoft Knowledge Base:
163435
VBA: Programming Resources for Visual Basic for Applications
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbhowto kbProgramming KB142142 |
---|
|