
|
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, March 22, 2018 – Permalink – VBA Named ArgumentsAn easier readUse named arguments for cleaner VBA code. Most likely, you use positional arguments when working with VBA functions. For instance, to create a message box, you probably use a statement that adheres to the following syntax: 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", _ Prompt:="Hello World!" (To find out a function's named arguments, select the function in your code and press [F1].) See all Topics powerpoint Labels: VBA <Doug Klippert@ 3:55 AM
Comments:
Post a Comment
Tuesday, January 23, 2018 – Permalink – Office VBA TricksVideo + Free code"Learn tips and use sample code for several Office applications. These tips can help you to be more productive and can also be a starting point for developing your own tools, utilities and techniques."
VBA Tips & Tricks Getting Started with VBA in Office 2010 Download Office 2013 VBA Documentation (VBA is VBA and is, in most cases, usable in all versions of Office) See all Topics powerpoint <Doug Klippert@ 3:03 AM
Comments:
Post a Comment
Saturday, September 02, 2017 – Permalink – Indent CodeRealign a bunchIndenting blocks of VBA code, such as statements within loops or If...Then statements, makes reading a procedure much easier. You probably indent a code statement using the [Tab] key, and outdent by using [Shift][Tab]. However, you may not be aware that the [Tab] and [Shift][Tab] techniques also work when multiple code lines are selected. The Visual Basic Editor also provides Indent and Outdent buttons on the Edit toolbar that allow you to easily reposition blocks of code. See all Topics powerpoint <Doug Klippert@ 3:35 AM
Comments:
Post a Comment
Monday, July 11, 2016 – Permalink – Change Code to CommentsFast solutionWhen you're testing procedures, you can temporarily convert a block of VBA code to comments that will be ignored during a trial run. Doing so manually by inserting an apostrophe before each line of code can be a real chore. To simplify this task,
See all Topics powerpoint <Doug Klippert@ 3:56 AM
Comments:
Post a Comment
Sunday, April 17, 2016 – Permalink – VBA HelpFrom MicrosoftHere is a Help reference covering the vagaries of VBA. Office VBA Language Reference See all Topics powerpoint Labels: VBA <Doug Klippert@ 3:09 AM
Comments:
Post a Comment
|