Book Home Page Bloglines 1906 CelebrateStadium 2006 OfficeZealot Scobleizer TechRepublic AskWoody SpyJournal Computers Software Microsoft Windows Excel FrontPage PowerPoint Outlook Word ![]() ![]() Host your Web site with PureHost! ![]() |
![]() ![]() Thursday, February 21, 2008 – Permalink – VBA, Named ArgumentsAn easier read
MsgBox(prompt[, buttons] [, title] [, helpfile, context]) When you work the MsgBox function this way, the order of the arguments can't be changed. Therefore, if you want to skip an optional argument that's between two arguments you're defining, you need to include a blank argument, such as: MsgBox "Hello World!", , "My Message Box" Named arguments allow you to create more descriptive code and define arguments in any order you wish. To use named arguments, simply type the argument name, followed by :=, and then the argument value. For instance, the previous statement can be rewritten as: MsgBox Title:="My Message Box", _ (To find out a function's named arguments, select the function in your code and press [F1].) See all Topics word Labels: VBA <Doug Klippert@ 7:59 AM
Comments:
Post a Comment
|