Hộp thoại MsgBox trong Excel VBA – Freetuts

vbOKOnly
1
Buttons
Ok button.

vbOKCancel
1
Buttons
Ok and cancel buttons.

vbAbortRetryIgnore
1
Buttons
Abort, Retry and Ignore buttons.

vbYesNoCancel
1
Buttons
Yes, No and Cancel buttons.

vbYesNo
1
Buttons
Yes and No buttons.

vbRetryCancel
1
Buttons
Retry and Cancel buttons.

vbCritical
2
Icon
Critical Message icon.

vbQuestion
2
Icon
Warning Query icon.

vbExclamation
2
Icon
Warning Message icon.

vbInformation
2
Icon
Information Message icon.

vbDefaultButton1
3
Default button
Set button 1 to be selected.

vbDefaultButton2
3
Default button
Set button 2 to be selected.

vbDefaultButton3
3
Default button
Set button 3 to be selected.

vbDefaultButton4
3
Default button
Set button 4 to be selected. Note that there will only be four buttons if the help button is included with vbAbortRetryIgnore or vbYesNoCancel.

vbApplicationModal
4
Modal
Cannot access Excel while the button is displayed. Msgbox is only displayed when Excel is the active application.

vbSystemModal
4
Modal
Same as vbApplicationModal but the message box is displayed in front of all applications.

vbMsgBoxHelpButton
5
Other
Adds a help button

vbMsgBoxSetForeground
5
Other
Sets the message box windows to be the foreground window

vbMsgBoxRight
5
Other
Right aligns the text.

vbMsgBoxRtlReading
5
Other
Specifies text should appear as right-to-left reading on Hebrew and Arabic systems.