Please Note: This article is written for users of the following Microsoft Excel versions: 2007 and 2010. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Documenting Changes in VBA Code.

Documenting Changes in VBA Code

Written by Allen Wyatt (last updated September 16, 2022)
This tip applies to Excel 2007 and 2010


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.)

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11288) applies to Microsoft Excel 2007 and 2010. You can find a version of this tip for the older menu interface of Excel here: Documenting Changes in VBA Code.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Engineering Calculations

Need to normalize your data in some way so that all your values are in a given format? This tip presents a number of ...

Discover More

Creating a Normal Index

Adding an index to a document is an easy task. There are a couple of ways you can do it, as described in this tip.

Discover More

Forcing a Worksheet to be Protected Again

Excel allows you to protect your worksheets so they can only be changed as you want to have happen. If you unprotect a ...

Discover More

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!

More ExcelTips (ribbon)

Positioning a Column on the Screen

If you have static columns and dynamic columns on the screen, you may want the dynamic columns to always show a ...

Discover More

Generating Unique, Sequential Names

Do you need to create a number of words or phrases where you only alter a few letters in each one? If the alterations ...

Discover More

Determining a Random Value

Random values are often needed when working with certain types of data. When you need to generate a random value in a ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu 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.