0
votes

I have a macro-enabled workbook which contains several modules, each module containing a number of macros. My issue is that I open the macro list from the developer tab and no macros for my workbook are there anymore. When I open VBA, I still see them there and associated in the tree to the workbook/project. The macros are still in the modules as well.

Background: Today, after a bit of editing in one of the macros, I closed VBA, got a prompt about a project being reset, I clicked ok. Problems began. All macros in the workbook used to show up from the macros prompt in the developer tab.

Project/Workbook tree with associated modules containing macros; no macros showing in workbook

1
Do you have Option Private Module on top of the modules? If so, you can either remove it or comment it out.Super Symmetry
Also note subroutines that have parameters do not appear on the macros dialog. However, in your case (from the image) at least one subroutine doesn't have parameters and therefore, should appear on the dialog (if Option Private Module is not declared)Super Symmetry
Thanks for the quick response. I've checked the modules and they don't seem to have that line entered.Bryan C
Your description of how it began sounds like corruption. Try the open and repair function: support.microsoft.com/en-us/office/…HackSlash

1 Answers

0
votes

I think I realized what the problem was. I was having an issue with running a macro to which I decided to recover an earlier version of the workbook and saved over the original. Well, the macros were still hyperlinked to the recovered version of the workbook that had the name extension that included the date/time, therefore "belonging" to that workbook.

My fix: I right clicked the macroed object (button), assign macro, and deleted the hyperlink text and kept only the name of the macro. One by one, all macros were recovered to the workbook. :)