Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
MsgBox(prompt[, buttons][, title][, helpfile, context])
Can we use this syntax in Macros?if yes than how?
Regards
Sikandar
Hi Sikandar,
Please try this :-
MsgBox "Hello",vbInformation,"Test Title"
Details are below :-
Parameter | Description |
---|---|
prompt | Required. The message to show in the message box. Maximum length is 1024 characters. You can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return-linefeed character combination (Chr(13) & Chr(10)) between each line |
buttons | Optional. A value or a sum of values that specifies the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. Default value is 0
We can divide the buttons values into four groups: The first group (0-5) describes the buttons to be displayed in the message box, the second group (16, 32, 48, 64) describes the icon style, the third group (0, 256, 512, 768) indicates which button is the default; and the fourth group (0, 4096) determines the modality of the message box. When adding numbers to create a final value for the buttons parameter, use only one number from each group |
title | Optional. The title of the message box. Default is the application name |
helpfile | Optional. The name of a Help file to use. Must be used with the context parameter |
context | Optional. The Help context number to the Help topic. Must be used with the helpfile parameter |
Hope it will work.
- Manish
Hi Sikandar,
Please try this :-
MsgBox "Hello",vbInformation,"Test Title"
Details are below :-
Parameter | Description |
---|---|
prompt | Required. The message to show in the message box. Maximum length is 1024 characters. You can separate the lines using a carriage return character (Chr(13)), a linefeed character (Chr(10)), or carriage return-linefeed character combination (Chr(13) & Chr(10)) between each line |
buttons | Optional. A value or a sum of values that specifies the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. Default value is 0
We can divide the buttons values into four groups: The first group (0-5) describes the buttons to be displayed in the message box, the second group (16, 32, 48, 64) describes the icon style, the third group (0, 256, 512, 768) indicates which button is the default; and the fourth group (0, 4096) determines the modality of the message box. When adding numbers to create a final value for the buttons parameter, use only one number from each group |
title | Optional. The title of the message box. Default is the application name |
helpfile | Optional. The name of a Help file to use. Must be used with the context parameter |
context | Optional. The Help context number to the Help topic. Must be used with the helpfile parameter |
Hope it will work.
- Manish
Hi Manish Thank u sooo much.it worked for me..
Regards
Sikandar