unable to protect cells in macro sheet b/c runtime error 1004

R

rldjda

I inherited a spreadsheet that consists of 2 sheets. Sheet 1 has a macro
that sorts data from sheet 2. This is how it works:

I enter "automotive" into Sheet 1 A2.
Then I press Ctrl A.
This command automatcally enters data into column B ( data from Sheet 2 that
is associated with "automotive" in Sheet 2.

I want to protect the entire Sheet 1 to protect the macros EXCEPT for A2. I
am able to protect the sheet except for A2 (so people could enter data such
as "automotive), but when I do the Ctrl A command, I get an error saying,

"Run-time error 1004: The cell or chart you are trying to change is
protected and therefore read only."

How can I protect A2 in Sheet 1 without affecting the macros?
 
T

Tom Hutchins

One way...

Have your macro (Ctrl-A ) unprotect the sheet, update column B, then
re-protect the sheet.

Hope this helps,

Hutch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top