Subroutines and Functions

Tips, Tricks, and Answers

The following articles are available for the 'Subroutines and Functions' topic. Click the article''s title (shown in bold) to see the associated article.

   Passing Parameters to Functions
Functions can be used to perform repetitive tasks and return values to your main program. You can also pass values to a function, however, which makes them even more useful.

   Understanding Functions
Do some macro programming in VBA and you'll quickly find out that you can use functions to extend the power and flexibility of your programs. Here's why functions are so powerful and how you can put that power to work.

   Understanding Subroutines
The heart of creating powerful programs in VBA is to understand how to create subroutines. These structures allow you to break your large programming tasks down into bite-sized chunks that can be used again and again.

   Using Call to Run VBA Macros
An elegant way to run macros from within macros is to use the Call statement. In order to use it, you need to provide a reference from the calling project to the one being called.

This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.