Consulting

Results 1 to 12 of 12

Thread: How to get rid of these dead macros?

  1. #1

    How to get rid of these dead macros?

    Hi,

    Please see the attached file. This file has some dead macros which I have been trying to remove. This is just one sheet from a large file. The large file is there in my department for years.
    As you will notice that there is no code module in the file and nor is there a way to view these macros. The only way to see them in Excel is by using Tools à Macro à Macros…

    I want these macros out has someone as assigned the typical keyboard shortcuts to these macros and they are hampering my work style. For example, Ctr + S has been assigned to Macro 5. As a result I can’t use Ctr+S to save my work and that is very annoying. I tried to re-assign the shortcuts but it didn’t work.

    I also tried the code given on this page, but even it didn’t work and I got the following message: the VBProject is protected or has no components.

    Is there a way to get rid of these macros or at least re-assign the shortcut keys?

    Thanks.
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,445
    Location
    I think the macros are in hidden sheets that we are not seeing, maybe XLM sheets.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks. But, I just copied this one sheet from the main file into this new workbook.

    Also, how do I see the XLM sheets?

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,445
    Location
    I am suggesting post the whole workbook.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,715
    Location
    Control-F3 to edit named ranges

    Click the first one, scroll to the end of the (very long) list and shift - click the last to select them all

    Click Delete

    Control-S seems to save the WB. I didn't test any other

    Paul
    Attached Images Attached Images

  6. #6
    Thanks folks.

    Control-S seems to save the WB
    Yes! What a relief.

    I am suggesting post the whole workbook.
    I can't post the whole file for privacy reasons. But I don't understand one thing here. I just copied the data sheet in a new workbook using the 'move or copy' method and the macros still got transferred to the new file. That means those macros are somehow connectd to that sheet. It beats me.

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,715
    Location
    if you look at the names, there's a Macro03 with a Refers to =Data!Macro03

    I deleted all the names from the WB you posted, copied Data to new WB, and there were no macros in the copy

    Paul

  8. #8
    Note that there is also a number of hidden range names in your file which are corrupt (VBA cannot remove them).
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  9. #9
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,097
    Location
    I wasn't aware you could hide range names. How is this done and naturally how do you locate them?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  10. #10
    It is done by VBA code. I located them using my Name Manager add-in
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  11. #11
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,097
    Location
    I have found 10 macros.... is that all or have you found more?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  12. #12
    That was all indeed.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

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