'Assign Macro' does not show available macros

davidam

Active Member
Joined
May 28, 2010
Messages
474
Office Version
  1. 2021
Platform
  1. Windows
Hello All,
Occasionally, when attempting to edit a macro, the Assign Macro dialogue box does not list all of the available macros. Even though all macros work properly, I have always taken this as a sign of trouble and gone back a version and then proceeded forward. Does anyone know why this happens?
Thank you
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Private macros and macros requiring parameters do not show in the dialogue box.
 
Upvote 0
So you're saying that when you Alt+F8 and bring up the Macro dialogue box that the macros show for any event codes you are using?
 
Upvote 0
Yes absolutely. Something is seriously wrong if they do not. I have exported all of the subs, saved the files as xlsb to get rid of whatever error has lodged itself in there, and, upon inserting one sub, i can now see all of the macros in that sub listed in the dialogue box. This is the procedure i guess will be using to correct my file.
 
Upvote 0
Private macros and macros requiring parameters do not show in the dialogue box.

That's been my experience as well.

1695099153618.png
 
Upvote 0
Something is seriously wrong if they do not.
I would disagree, Event code, Private subs & subs that require arguments should never appear in the dialogue box.
 
Upvote 0
By definition, adding the word "Private" hides them from that last - that is exactly what "Private" is meant to do.
And you cannot have codes that requires parameters - that has always been the case.

Also, you should put the code you want to see publicly in General modules in VBA, and not in the Sheet or Workbook modules.

Lastly, be aware of what settings you are using here:
1695120629597.png
 
Upvote 0
I misunderstood NoSparks comment and it makes total sense that subs requiring parameters and Private subs should not appear as available for assignment. What I was describing is a situation where the dialogue box just forgets all macros except the one that is actually assigned to a button--a case where it should show dozens of available macros. I have seen this a few times--I don't know why it happens. In any case, my solution of exporting all of the macros, and then re-importing them did work. Thanks to all!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,306
Members
449,095
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top