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 March 25, 2015)
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.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Named ranges are a great tool to use in developing formula-heavy workbooks. You may want, at some point, to copy your named ...Discover More
Copying information using a macro is rather simple, although there are multiple ways you can do the copying. The most ...Discover More
Do you need to create a number of words or phrases where you only alter a few letters in each one? If the alterations follow ...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.