For example, we can ask the user a question and they can respond by clicking on the Yes or No button. We can use the message box to get a simple response from the user. The following are all the return values for the MsgBox function:Įach of these values represents a button that was clicked. It is very unlikely you use this unless you are creating an application for a third party and help files are a requirement. Helpfile, context – These parameters are used to reference a help file and location of specific help text. Title – this is the title that will appear at the top of the message box. See the next section for more about this parameter. If this parameter is not used a message box with the Ok button and no icon is displayed. Prompt – This is the message text that will be displayed.īuttons – This parameter does many things including setting the buttons, icons, select button, modal type etc. The parameters of the message box are as follows: ![]() MsgBox "There is no data on this worksheet ",, "Error" End Sub ![]() MsgBox "There is no data on this worksheet " ' Basic message with "Error" as the title The following code shows how to display a simple message box: ' Sub BasicMessageBox() ![]() In most cases, you will use MsgBox to simply display a message or to ask the user to click Yes/No or Ok/Cancel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |