MsgBox Function

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

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


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

αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

αž…αŸ†αž“αž½αž“β€‹αž‚αžαŸ‹

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

β€‹αž’αžαŸ’αžαž”αž‘β€‹ αŸ– αž€αž“αŸ’αžŸαŸ„αž˜β€‹αžαŸ’αžŸαŸ‚β€‹αž’αž€αŸ’αžŸαžšβ€‹αžŠαŸ‚αž›β€‹αž”αž„αŸ’αž αžΆαž‰β€‹αžŸαžΆαžšβ€‹αž€αŸ’αž“αž»αž„β€‹αž”αŸ’αžšαž’αž”αŸ‹Β αŸ” αž€αžΆαžšβ€‹αž…αž»αŸ‡β€‹αž”αž“αŸ’αž‘αžΆαžαŸ‹β€‹αž’αžΆαž…β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž”αž‰αŸ’αž…αžΌαž›β€‹αžŠαŸ„αž™β€‹αž”αŸ’αžšαžΎ 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.


αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαž‘αž”αŸ‹ αŸ–

Named constant

Integer value

Definition

IDOK

1

OK

IDCANCEL

2

Cancel

IDABORT

3

Abort

IDRETRY

4

Retry

IDIGNORE

5

Ignore

IDYES

6

Yes

IDNO

7

No


Error codes:

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

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


Sub ExampleMsgBox
Dim sVar As Integer
 sVar = MsgBox("Las Vegas")
 sVar = MsgBox("Las Vegas",1)
 sVar = MsgBox( "Las Vegas",256 + 16 + 2,"Dialog title")
 sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYCANCEL, "Dialog title")
End Sub

Please support us!