MsgBox Statement

αž”αž„αŸ’αž αžΆαž‰β€‹β€‹β€‹αž”αŸ’αžšαž’αž”αŸ‹β€‹β€‹β€‹αž˜αž½αž™β€‹β€‹β€‹αžŠαŸ‚αž›β€‹β€‹β€‹αž˜αžΆαž“β€‹β€‹αžŸαžΆαžšΒ αŸ”

αžœαžΆαž€αŸ’αž™β€‹αžŸαž˜αŸ’αž–αž“αŸ’αž’ αŸ–


MsgBox Text As String [,Type As Integer [,Dialogtitle As String]] (As Statement) or MsgBox (Text As String [,Type As Integer [,Dialogtitle As String]]) (As Function)

αž”αŸ‰αžΆαžšαŸ‰αžΆαž˜αŸ‰αŸ‚αžαŸ’αžš αŸ–

β€‹αž’αžαŸ’αžαž”αž‘β€‹ αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž”αž„αŸ’αž αžΆαž‰β€‹αžŸαžΆαžšβ€‹αž€αŸ’αž“αž»αž„β€‹αž”αŸ’αžšαž’αž”αŸ‹Β αŸ” αž€αžΆαžšβ€‹αž…αž»αŸ‡β€‹αž”αž“αŸ’αž‘αžΆαžαŸ‹β€‹αž’αžΆαž…β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž”αž‰αŸ’αž…αžΌαž›β€‹αžŠαŸ„αž™β€‹αž”αŸ’αžšαžΎ Chr$(13)Β αŸ”

DialogTitle αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž”αž„αŸ’αž αžΆαž‰β€‹αž€αŸ’αž“αž»αž„β€‹αžšαž”αžΆαžšβ€‹αž…αŸ†αžŽαž„αž‡αžΎαž„β€‹αž“αŸƒβ€‹αž”αŸ’αžšαž’αž”αŸ‹Β αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎαžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž›αž»αž”β€‹ αžšαž”αžΆαžšβ€‹αž…αŸ†αžŽαž„αž‡αžΎαž„β€‹αž”αž„αŸ’αž αžΆαž‰β€‹αžˆαŸ’αž˜αŸ„αŸ‡β€‹αž“αŸƒβ€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αž“αžΈαž˜αž½αž™αŸ—β€‹Β αŸ”

Type αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αž…αŸ†αž“αž½αž“β€‹αž‚αžαŸ‹β€‹αžŽαžΆβ€‹αž˜αž½αž™β€‹αžŠαŸ‚αž›β€‹αž”αž‰αŸ’αž‡αžΆαž€αŸ‹β€‹αž”αŸ’αžšαž—αŸαž‘β€‹αž”αŸ’αžšαž’αž”αŸ‹ αž€αŸβ€‹αžŠαžΌαž…αž‡αžΆβ€‹αž…αŸ†αž“αž½αž“ αž“αž·αž„β€‹αž”αŸ’αžšαž—αŸαž‘β€‹αž”αŸŠαžΌαžαž»αž„β€‹αžŠαžΎαž˜αŸ’αž”αžΈβ€‹αž”αž„αŸ’αž αžΆαž‰ αž“αž·αž„β€‹αž”αŸ’αžšαž—αŸαž‘β€‹αžšαžΌαž”β€‹αžαŸ†αžŽαžΆαž„Β αŸ” Type αžαŸ†αžŽαžΆαž„β€‹αž²αŸ’αž™β€‹αž”αž“αŸ’αžŸαŸ†β€‹αž“αŸƒβ€‹αž›αŸ†αž“αžΆαŸ†β€‹αžαžΌαž…β€‹αŸ— αž“αŸ„αŸ‡β€‹αž‡αžΆβ€‹αž”αž“αŸ’αžŸαŸ†β€‹αž“αŸƒβ€‹αž’αžΆαžαž»β€‹αž’αžΆαž…β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž€αŸ†αžŽαžαŸ‹β€‹αžŠαŸ„αž™β€‹αž”αž“αŸ’αžαŸ‚αž˜β€‹αžαž˜αŸ’αž›αŸƒβ€‹αžšαŸ€αž„β€‹αŸ—β€‹αžαŸ’αž›αž½αž“β€‹αžšαž”αžŸαŸ‹β€‹αžœαžΆ αŸ–

Named constant

Integer value

Definition

MB_OK

0

Display OK button only.

MB_OKCANCEL

1

Display OK and Cancel buttons.

MB_ABORTRETRYCANCEL

2

Display Abort, Retry, and Ignore buttons.

MB_YESNOCANCEL

3

Display Yes, No, and Cancel buttons.

MB_YESNO

4

Display Yes and No buttons.

MB_RETRYCANCEL

5

Display Retry and Cancel buttons.

MB_ICONSTOP

16

Add the Stop icon to the dialog.

MB_ICONQUESTION

32

Add the Question icon to the dialog.

MB_ICONEXCLAMATION

48

Add the Exclamation Point icon to the dialog.

MB_ICONINFORMATION

64

Add the Information icon to the dialog.

128

First button in the dialog as default button.

MB_DEFBUTTON2

256

Second button in the dialog as default button.

MB_DEFBUTTON3

512

Third button in the dialog as default button.


Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

αž§αž‘αžΆαž αžšαžŽαŸ αŸ–


Sub ExampleMsgBox
 Const sText1 = "An unexpected error occurred."
 Const sText2 = "The program execution will continue, however."
 Const sText3 = "Error"
 MsgBox(sText1 + Chr(13) + sText2,16,sText3)
 MsgBox(sText1 + Chr(13) + sText2, MB_ICONSTOP, sText3)
End Sub

Please support us!