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: Finding Workbooks Containing Macros.
by Allen Wyatt
(last updated January 4, 2018)
Richard's company, like many others, uses Excel quite a bit. In fact, they have thousands and thousands of Excel workbooks that they have collected over the years. Richard needs a way to find out which of those workbooks have VBA macros in them, without the need to open and inspect each workbook individually. He wonders if there is an easy way to do this.
The easiest way to do this is to use the search capabilities of Windows (outside of Excel) and search for any file that contains the text "End Sub" or "End Function". That will quickly identify any potential candidate workbooks, as any VBA procedure must use one of these two statements at its end. There are also some third-party search utilities that can easily look inside Excel files to determine if the "End Sub" or "End Function" text is there.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12465) 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: Finding Workbooks Containing Macros.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
If you have a macro that selects different columns in a worksheet while processing information, you may get some ...Discover More
Excel allows you to add pictures to your worksheet, even within a macro. However, you might have a bit harder time ...Discover More
Part of writing macros is to make sure they work as you expect. This involves a process known as debugging. Here's how ...Discover More
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.