Tips, Tricks, and Answers
The following articles are available for the 'Managing Macros' topic. Click the article''s title (shown in bold) to see the associated article.
Aborting a Macro and Retaining Control
If you need to exit a macro before it is finished running, you can do it using a brute force method, or you can build in a way to gracefully exit. This tip discusses the latter way to get out of a macro and still retain a modicum of control.
Automating Copying Macros
You can manually copy macros from one workbook to another, but what if you want to automate the copying process? Here's some ideas you can try out.
Clean Up Your Macro List
Got a workbook cluttered with all sorts of macros? Delete them and you'll make your workbook easier to manage.
Develop Macros in Their Own Workbook
If you develop macros and edit them quite a bit, you may be running the risk of causing problems with the macros or with your workbooks. This tip explains a general way that you can avoid the potential problem.
Disabling Shift Key Use when Opening a Workbook
Open up a workbook, and Excel normally runs the macros associated with that workbook. You can disable the automatic running of macros by holding down the Shift key while the workbook opens. If you want to defeat this ability, you may be out of luck.
Generating a List of Macros
Got a workbook that has lots and lots of macros associated with it? Here's a way you can get a list of all of those macros into a worksheet.
Need to hide some macros in your workbook? There are three ways you can do it, as covered in this discussion.
One Shortcut for Two Macros
Excel allows you to assign shortcut keys to macros. Given two different workbooks each containing different macros, it is possible that a macro from each workbook could use the same shortcut. Here's how that apparent conflict plays out in Excel.
Recovering Macros from Corrupted Workbooks
Workbooks get corrupted from time to time; that's a fact of life in an Excel world. If those corrupted workbooks contain macros that you need to recover, there are a few steps you can go through to get them back.
Removing a Directory
Macros allow you to perform all sorts of file-related operations. One such operation allows you to delete a directory. This tip shows how easy this can be.
Renaming a File
Need to rename a file in a macro? It's easy to do using the Name command, as discussed in this tip.