To specify arguments by position, follow the order presented in the syntax, separating each argument with a comma, for example: MsgBox "Your answer is correct!",0,"Answer Box" (Do not type the brackets in your Visual Basic code.) For the MsgBox function, the only argument you must provide is the text for the prompt.Īrguments for functions and methods can be specified in code either by position or by name. Arguments enclosed in brackets are optional. In the MsgBox function syntax, the italic words are named arguments of the function. For example, the following procedure activates the second window in the active document. Words that are bold should be typed exactly as they appear. In the Activate method syntax, the italic word "object" is a placeholder for information you supply-in this case, code that returns an object. The examples in this topic explain how to interpret the most common syntax elements. The syntax in a Visual Basic Help topic for a method, function, or statement shows all the elements necessary to use the method, function, or statement correctly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |