Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Documenting Changes in VBA Code.
by Allen Wyatt
(last updated June 18, 2018)
Phil is a member of his bank's MIS department. The department creates a lot of management reports using Excel. In doing so they write a lot of macros to automate the reports as much as possible. Because of the Sarbanes-Oxley act the bank is required to track changes to the VBA code. Phil wonders if there are any products or methods to track the changes in the VBA code that would highlight what was changed and then preserve those changes for documentation purposes.
The easiest way to do this would be to periodically export the macro code to a text file, and then archive the text files. This could be done every day, week, month, etc., or it could be done anytime there is a change in the code. Simply give each text file a different descriptive name so you can tell which version the file contains.
Once in text-file format, the files can be easily compared against one another to highlight differences; there are any number of commercial products that could be used for comparing the text files. (You could even use Microsoft Word to compare different versions of files.)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3808) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Documenting Changes in VBA Code.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Normally a macro is only calculated when you specifically tell Excel to calculate it. Some macros need to be calculated ...Discover More
If you need to find out how many columns are set to be a specific width, you'll need a macro to help determine the info. ...Discover More
Excel doesn't provide an easy way to grab the worksheet name for use within a worksheet. Here are some ideas on ways you ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.