Excel Interacting With User

Message Box When small informational messages or simple questions need to be asked, the MsgBox (message box) function can be used. A primary advantage of using a message box is that it lets you present a message to the user that can't be ignored. The syntax of a message box statement is shown here. MsgBox (prompt [, buttons] [, title][, helpfile, context]) as Integer Prompt A required argument for the MsgBox function that contains the text that is displayed within the message box. Buttons Optional numerical argument used to specify the buttons and the icon that is to be displayed within the message box. Title Optional string argument used to specify the text to be displayed within the message boxes title bar.

If omitted, "Microsoft Office Excel" is displayed. Helpfile Optional string argument used to specify the help file used to provide context-sensitive help. Context Optional numerical argument that is the Help context number assigned to the appropriate Help topic. If a Cancel button is displayed in the message box, pressing Esc has the same effect as clicking it. The simple message box can be displayed as following Sub Welcome ( ) MsgBox ("Welcome To Excel") End Sub Input Box An input box is similar to a message box in that it displays text, but it has the additional functionality of being able to accept text responses from users. Instead of presenting the user with a few buttons that can be clicked in response to messages displayed in the window, input boxes contain a text box where the user can type in responses.

InputBox (prompt [, title][, default][, xpos][, ypos][, helpfile, context]) as String Prompt Required argument for the InputBox function that contains the text that is displayed within the input box. Title Optional string argument used to specify the text to be displayed within the input boxes title bar. Default Optional string value that is displayed within the text box as the default value if no other information is entered. Xpos Optional numeric expression that represents the number of twips from the left edge of the screen to the left edge of the input box.

Ypos Optional numeric expression that represents the number of twips from the top edge of the screen to the top edge of the input box. Helpfile Optional string argument used to specify the help file used to provide context-sensitive help. Context Optional numerical argument that is the Help context number assigned to the appropriate Help topic. The InputBox function returns a string value, so if the text box is blank or the Cancel button pressed, the returned string is empty.

The returned value from an input box is usually stored within a string variable so that it can be processed further. Public Sub Example ( ) Dim StrInput as String Dim StrResponse as String StrInput = InputBox ("Please provide the text for Message Box", "Input Box Example") StrResponse = MsgBox (strInput, vbOKOnly, "Message Box") End Sub.

World Web Directory
We are the fastest growing human edited web directory in the world. Listing of new website in 48 hours on static html pages with static text links.We are the only directory providing life time directory listing on static html pages.

Excel VBA Tutorial
We Provide Professional Training For Microsoft Excel and VBA With Video Example.



Website Design






Windows Registry Repair It Is Not As Complex As You Think - The Windows Registry might seem like a complex thing and from a certain perspective it is.

How To Use A PDA Cell Phone To Reduce Stress And Organize Your Life - Do you stress over trying to remember schedules and appointments? Do you need to be able to access the internet on the road for email or information? If, so you consider getting one of the new PDA cell phones that are now available.

The Philadelphia Experiment - The Philadelphia Experiment is an United States Navy experiment, done on October 28, 1943.

Excel Interacting With User - Accepting input from users and providing status messages are common tasks that you?ll use within many procedures.

Shopping cart software - Shopping cart software is a software application through which one can help people buy through the Internet.

more...
©Copyright 2024 jwr1.com All rights reserved. Unauthorized duplication in part or whole strictly prohibited by international copyright law.