How can I get back in to macros that I made private in the past so that I can alter their code?

Glühbirne

New Member
Joined
Jul 5, 2012
Messages
6
Hello Everyone,

I recently started working in a workbook that I had made quite a few months ago. I had made my macros private because I didn't want users to be able to run them in any way except for through buttons that I had inserted. Now, I want to get back into my macros and work on the code some more, but I don't know how to get in to them to even see the code. I try right clicking on the worksheets and selecting "View Code", in Visual Basic but that doesn't do anything. I know that the macros are still there, because I had attached them to buttons, and those buttons still work and run them. Am I destined to never be able to get into my macros again, or is there a way to find them? Thanks in advance for your help.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to the Board!

ALT+F11 will open the VBE (Visual Basic Editor), where you can browse to your code. If it's not event code then it's most likely going to be stored in Modules.. Just look through each object in the Project Explorer until you find your code.

HTH,
 
Upvote 0
I don't see any modules. I'm looking in the "Project Explorer." Is this the correct place to look? All I see are all of my worksheets. Pardon my ignorance.
 
Upvote 0
Are the macros in your PERSONAL.XLS?

What sort of buttons do you have?


I'm not sure. How can I check, or where might I find my PERSONAL.XLS?

I just have grey buttons that I got from going to the Developer Tap and clicking "Insert" in the Controls group and then selecting button from the "Form Controls" and dragging it to the place I wanted it. If I remember correctly, I attached the button to the macro before making the macro private, then made the macro private after the fact. The macros all start with "mac_" but other than that I can't even remember the exact names. :(
 
Upvote 0
Okay, when I do that I do get the macro name, but the only options are "New" and "Record." There is no option to "Edit."

At least I can get the exact names now though, which is a start, I guess.

Any other ideas? Could the whole module be hidden maybe? I certainly have learned my lesson not to hide things when I don't really know what I'm doing.
 
Last edited:
Upvote 0
What is the name of the macro? If you click the button does the macro run? Maybe the workbook that contains it isn't open, but it will open if you click the button.
 
Upvote 0
What is the name of the macro? If you click the button does the macro run? Maybe the workbook that contains it isn't open, but it will open if you click the button.


"The macro may not be available in this workbook or all macros may be disabled." :confused: All macros are enabled, so it must be the former.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,142
Members
448,551
Latest member
Sienna de Souza

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