Types of Msgbox

Try this different types of msgbox

Private Sub Command1_Click()
MsgBox Text1.Text
'Message Box with Yes/no options
MsgBox Text1.Text, vbYesNo
MsgBox Text1.Text, vbCritical
'Message Box displaying Information
MsgBox Text1.Text, vbInformation
xx = MsgBox(Text1.Text, vbMsgBoxSetForeground)
'Message Box with Yes/No/cancel options
MsgBox Text1.Text, vbYesNoCancel
End Sub


Author: Deepika Haridas07 Jul 2009 Member Level: Gold   Points : 1

Hi Jaya Kumar,

Provide proper comments along with your code and proper title.


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: