Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ca\nt 'Edit' Macro in an Excel workbook 1

Status
Not open for further replies.

deisehun

Programmer
Joined
Nov 24, 2006
Messages
182
Location
IE
I have Office XP installed on an XP SP2 client.

Up to today, I opened the workbook, selected 'Enable Macros' & then 'Update'

I then went Tools/Macro/Macros - the Macro name is displayed and I would click Edit to edit the macro

Since this morning, the Edit button is greyed out.

I've tried numerous client pc's and versions of office - no joy.

Can anyone help?

Thanks
 
Most likely it's protected.

Member- AAAA Association Against Acronym Abusers
 
If I select Tools/Protection - >The first three options are greyed out and the fourth - Protect Shared Workbook, is available.

Does this make sense?

Thanks.
 
Tyr going to Tools, Macro, Visual Basic Editor and see if you can edit that way. If it's protected, it will stop you.

Member- AAAA Association Against Acronym Abusers
 
A grey blank screen appears when I select those options.

How can I unprotect so?
 
I am sorry, it's my fault. I need to be a little more detailed. I usually assume people know what to do. Once you get there; you need to see if there is a folder on the left called Module. You need to open that and try to open any modules that exist. If the module is protected, then it will prompt you for a password.

If there is no module folder then double click other elements such as Sheet1, This workbook etc if the macros are located there.

Member- AAAA Association Against Acronym Abusers
 
Sorry XLHelp - when I go where?

If I open VB Editor - there is nothing at all on the left - There is a top toolbar, if I click 'Object browser' - Two projects appear.

If I double click the first project - it asks for a password
If I double click the second project - it says 'Project is unviewable'

Any ideas?
 
I think you found what you were looking for. The VBA projects usually have names associated with them, such as the name of your workbook. If it's asking for a password, you need one to view the project. There is no other way around. I least, I have not been able to find one.

Member- AAAA Association Against Acronym Abusers
 
False alarm - the macro looking for a password is a 3rd party app to convert xls file to pdf's

The one I want gives an error 'Project Locked. Project is unviewable'.

The same file from 2006 allows me edit the macro and export it as a .bas file.

Is there a way I can either copy the code from the 2006 Macro into the current file, or import the .bas file into the 2007 file that wont allow me edit the Macro?

Thanks..
 
To import bas file, while in VBA editor, File, Import....

I would rather move all my wkhseets to another file and import the macro there. Sure hope what you are doing is within the ethics guidelines.

Member- AAAA Association Against Acronym Abusers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top