+ Reply to Thread
Results 1 to 5 of 5

How to determine where a macro is being used

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    How to determine where a macro is being used

    Greetings,
    If my question has been answered I apologize, but I have searched for the past few hours and cannot find anything.
    I am needing to "clean up" the workbook to reduce the size. I have several macros that I believe are not being used and would like to delete them. However, before I delete them I would like to search the workbook to confirm if they are being used or not. I know I can search within the Visual Basic Editor, but how can I search the workbook to find where the macro is being used?

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: How to determine where a macro is being used

    .
    You can do a 'search' in the VBE for the macro's name. Select the search area to be the entire project and not the current module. The search / find function is located in the VBE / EDIT / FIND.

    You can right click on any button or shape that is being used as a button and attached to a macro ... to see which macro it runs .. then track the path of the macro that way.

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: How to determine where a macro is being used

    Logit,
    Unless I am doing something wrong, your first suggestion only searches within the VBE, not where the macro is assigned to a button. I am wanting to determine where the macro is being used in the workbook without having to search every button. I was thinking there should be a way of doing that?

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: How to determine where a macro is being used

    .
    There may be a means of doing that, but I am not familiar. Sorry.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to determine where a macro is being used

    You'ld have to search each cell to see if the formula used any UDF. (and Names and DataValidation and Conditional Formatting to be really complete)
    You'd have to loop through each shape on each sheet to look at its OnAction property.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Determine macro behind button on QAT
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-09-2015, 12:00 PM
  2. Determine OFFSET value macro
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-14-2014, 01:07 AM
  3. Need Help Modifying Macro to Determine which workbook to run macro on
    By enk529 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2013, 06:28 PM
  4. Determine Length in a Macro
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2013, 05:27 PM
  5. Macro to determine count
    By treeleaf20 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2009, 05:22 PM
  6. Macro to determine values
    By treeleaf20 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-10-2009, 06:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1