Discussion Locked

vba buttons

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

can you design or create your own buttons to use in vba msgbox's, etc..?? and alos is there somewhere you can go to see a list of buttons available to choose?
thanks

3 replies

by dklippert

Here is a list of "built in" buttons.
If you design a form with the Visual Basic Editor, you can name a button whatever you want. You can also assign custom actions to the buttons you create.
You can find information on VBA in this article:
(Typethe Q number into the ?For solutions containing...? box at support.microsoft.com)
VBA: Programming Resources for Visual Basic for Applications
Q163435

Constant Value Description
vbOKOnly 0 OK button only (default)
vbOKCancel 1 OK and Cancel buttons
vbAbortRetryIgnore 2 Abort, Retry, and Ignore buttons
vbYesNoCancel 3 Yes, No, and Cancel buttons
vbYesNo 4 Yes and No buttons
vbRetryCancel 5 Retry and Cancel buttons
vbCritical 16 Critical message
vbQuestion 32 Warning query
vbExclamation 48 Warning message
vbInformation 64 Information message
vbDefaultButton1 0 First button is default (default)
vbDefaultButton2 256 Second button is default
vbDefaultButton3 512 Third button is default
vbDefaultButton4 768 Fourth button is default
vbMsgBoxHelpButton 16384 Adds Help button to the message box

This discussion is closed to new replies.