0% found this document useful (0 votes)
33 views

Computer Software Applications

This document provides examples of using different types of message boxes in VBA code and lists the available options for message box buttons and icons. It shows how to display basic message boxes with text only and includes examples of using message boxes with buttons like OK, Yes/No, Retry/Cancel and icons like Information, Critical, Question, and Exclamation.

Uploaded by

Sk Madhukar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Computer Software Applications

This document provides examples of using different types of message boxes in VBA code and lists the available options for message box buttons and icons. It shows how to display basic message boxes with text only and includes examples of using message boxes with buttons like OK, Yes/No, Retry/Cancel and icons like Information, Critical, Question, and Exclamation.

Uploaded by

Sk Madhukar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Eg: Sub CommandButton1()

MsgBox "This is a sample box"


End Sub
Eg: Sub CommandButton1()
MsgBox "Should we stop?", vbYesNo
End Sub

Types of MsgBox:

MsgBox "Want to Continue?", vbOKCancel

MsgBox "Should we stop?", vbYesNo

MsgBox "What do you want to do?", vbAbortRetryIgnore

MsgBox "Should we stop?", vbYesNoCancel

MsgBox "What do you want to do next?", vbRetryCancel

MsgBox "What do you want to do next?", vbRetryCancel + vbMsgBoxHelpButton

MsgBox "What do you want to do next?", vbYesNoCancel + vbDefaultButton2

MsgBox "This is a sample box", vbCritical

MsgBox "This is a sample box", vbYesNo + vbInformation

MsgBox "This is a sample box", vbYesNo + vbCritical

MsgBox "This is a sample box", vbYesNo + vbQuestion

MsgBox "This is a sample box", vbYesNo + vbExclamation

You might also like