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.

   Checking if a Workbook is Already Open
Knowing of a workbook is already open can be a prerequisite to your macro working correctly. Here's how to check it out.

   Deleting Worksheet Code in a Macro
When creating an application in VBA for others to use, you might want a way for your VBA code to modify or delete other pieces of your VBA code. In theory this can be easy to do; this tip explains how.

   Disabling a Function Key
Function keys are used to perform common tasks in Excel. If you want to disable one of the function keys, it's rather easy to do. Here's how to do it.

   Displaying the Print Dialog Box in a Macro
Want to print a document by using a macro? One way is to display the Print dialog box and allow the user to interact with it. This tip demonstrates how easy it is to actually pull up the desired dialog box.

   Progression Indicator in a Macro
When your macro is humming along, minding its own business, a user watching the screen may not see any activity and therefore may wonder if the macro is really working. One way to keep users up-to-date on what is happening is to have the macro provide some sort of progress indicator.

   Turning Off Screen Updating
Want a quick way to speed up your macros? All you need to do is to stop Excel from updating the screen while the macro is running. Here's how to do it.

   Understanding Functions in Macros
Functions are a common programming construct. They help you to create easy ways of processing information and returning a value. Here's how to create your own functions.

   Understanding Subroutines
When developing macros, you can create subroutines. This is a great way to reuse common code and make your programming tasks easier.

   Using a Progress Indicator in Macros
A few tips on adding a progress indicator that runs during long macro calculations.

This Site

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

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, 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.