acMsgBoxStyle

Member Value Description
vbOKOnly 0 Displays OK button only.
vbOKCancel 1 Displays OK and Cancel buttons.
vbAbortRetryIgnore 2 Displays Abort, Retry, and Ignore buttons.
vbYesNoCancel 3 Displays Yes, No, and Cancel buttons.
vbYesNo 4 Displays Yes and No buttons.
vbRetryCancel 5 Displays Retry and Cancel buttons.
vbCritical 16 Displays Critical Message icon + System beep.
vbQuestion 32 Displays Warning Query icon + System beep.
vbExclamation 48 Displays Warning Message icon + System beep.
vbInformation 64 Displays Information Message icon + System beep.
vbDefaultButton1 0 First button is default.
vbDefaultButton2 256 Second button is default.
vbDefaultButton3 512 Third button is default.
vbApplicationModal 0 Application is modal. The user must respond to the message box before continuing work in the current application.
bnSystemModal 4096 System is modal. All applications are suspended until the user responds to the message box.
vbMsgBoxSetForeground 65536 Specifies the message box window as the foreground window.
vbMsgBoxRight 524288 Text is right-aligned.
vbMsgBoxRtlReading 1048576 Specifies text should appear as right-to-left reading on Hebrew and Arabic systems.

More than one of the options can be chosen, add numbers together to combine them.

When adding numbers to create a final value for the Buttons argument, use only one number from each group.

System beeps: if no button icon is added then no system beep will be produced.

In addition to the above there is an HTML help option for MsgBox (vbMsgboxHelpButton) unfortunately this is broken in Access 2007 and above and so its use is best avoided.

Example

vbOKCancel + vbExclamation

“An honest tale speeds best being plainly told” ~ William Shakespeare (Richard III)

Related

InputBox - Prompt for user input.
MsgBox - Display a message in a dialogue box.


 
Copyright © 1999-2024 SS64.com
Some rights reserved