Editing Recorded Macros
As mentioned earlier in this chapter, the macros recorded in Excel are stored as Visual Basic for Applications code instructions.
Visual Basic for Applications (VBA) programming is outside the scope of this book. However, being able to view the source code for your macro may be helpful in identifying and fixing simple errors or making small changes. Often times, editing the macro in the Visual Basic Editor to change the way it behaves is more expedient than having to record the macro again.
Even if you have no programming skills, you may still be able to identify errors and make small changes, for example, spelling errors in the text, errors in the values, or errors in formulas. You don’t need programming skills to make simple changes like these. Also, you may see something out of place in the code that helps you to avoid the error if you choose to re-record the macro.
Unhiding the Personal Macro Workbook
If the macro you want to edit is stored in your Personal Macro Workbook, you must unhide this workbook before you edit it in the Visual Basic Editor.
Follow the steps below to unhide the Personal Macro Workbook:
- On the View
tab, click the Unhide
command button.
Excel displays the Unhide
dialog box showing the PERSONAL.XLSB workbook in the Unhide Workbook list.
- Select PERSONAL.XLSB in the list box and click on OK
to unhide the workbook.
With the Personal Macro Workbook unhidden, you can now edit its macros in the Visual Basic Editor.