Cannot edit a Macro

Ben C

New Member
Joined
Feb 6, 2006
Messages
31
Hi All,

When I list my macros using alt+F8 the edit option is no longer available, any ideas what I have done?

Many Thanks

Regards

Ben
 
When viewing the code in VBA editor, click into the code.
Hit F8. That will put a Yellow hightlight on the first line of code that will be processed when you hit F8 again.
Each time you hit F8 is a "Step" in the code. Size the VBA window so you can view both your code and your worksheet. Excellent way to troubleshoot your code.
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

I cannot expand the macro to click any part of it. The only item I can see is the title.

Regards

Ben
 
Upvote 0
Doesn't sound like you are in the VBA Editor.
Can you open VBA Editor, (Alt-F11), and edit them there?

Can you see your macro code there?
Can you Step (F8) thru your code?
 
Upvote 0
I cannot expand the macro to click any part of it. The only item I can see is the title.

I take it that the Blue title bar says "Microsoft Visual Basic - and the name of your workbook.

If so click on the Project Explorer button on the tool bar.

Harry
 
Upvote 0
Hi,

the Blue title bar says "Microsoft Visual Basic - and the name of the workbook.

If I click the project explorer button I get on the top of the left hand screen a + sign and VBAProject with my file name. If I click the name or the + I get the message "Project Locked" at the top of an error box with "Project is unviewable" below is OK or help. The help leads me to a page on protection and how to change settings. This is workbook is not protected so this is not much help either.

Any ideas?

Thanks

Regards

Ben
 
Upvote 0
"Project Locked"
Refers to the VBA Project not the Workbook

Is this workbook and the associated code in the VBA Project one that you made, or is it one that somebody else made.

If the latter, that person assigned a password to the VBA Project for what ever reason.

Harry
 
Upvote 0
As TinaP asked 30 minutes after you first posted in this thread:
Is the macro in a password protected module?
Your macros have been password protected at the VBA project level.
You will need the password to unlock the project.
 
Upvote 0
Hi All,

Nothing is password protected. I have never used any passwords with any excel files. The macros are ones I have written and have been using with this workbook for about 18 months. I have regularly edited them with no problem but the last time I went to change somthing this problem occurred. If I check the Tools protection option it shows nothing as having a password only the option to set one.

Hope this helps

Regards

Ben
 
Upvote 0
Can you edit macros in other workbook files?
Is it just this workbook or all you open?

When you click the plus sign in VBA editor, do you get a prompt asking for a password?
Could someone else have locked your VBA project?
Do you have another saved version of this workbook you can use that allows you to edit your macros?
 
Upvote 0
Hi John,

Please see below

Can you edit macros in other workbook files?
No

Is it just this workbook or all you open?
All

When you click the plus sign in VBA editor, to you get a prompt asking for a password?
No

Could someone else locked your VBA project?
No

Do you have another saved version of this workbook you can use that allows you to edit your macros?

Yes I have another version and yes I can edit in that one. (The macros are all the same)

Thanks

Regards

Ben
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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