PROTECTING FORMULAS

D

Danny

I have a sheet where when opened, it runs an auto macro to move cell
contents from one
column to another and uses a formula to do some calculations. If I select
the columns I want unlocked, then protect the sheet and try to run the
macro, I get an "run time error 1004 unable to set the numberformat property
of the range class" When I debug the following is highlightd
"Selection.NumberFormat = ";;;" " I was a Lotus user and in Lotus I
could select a range of cells or columns to protect, I'm having a hard time
to get Excel to do the same.
I appreciate the help.
Danny
 
P

peter.loggie

Danny said:
I have a sheet where when opened, it runs an auto macro to move cell
contents from one
column to another and uses a formula to do some calculations. If I select
the columns I want unlocked, then protect the sheet and try to run the
macro, I get an "run time error 1004 unable to set the numberformat property
of the range class" When I debug the following is highlightd
"Selection.NumberFormat = ";;;" " I was a Lotus user and in Lotus I
could select a range of cells or columns to protect, I'm having a hard time
to get Excel to do the same.
I appreciate the help.
Danny

Hi Danny,

Is the problem that you have the worksheet protected when you try
running the macro? The error "unable to set the numberformat property
of the range class" suggests to me that the cells you are trying to
modify are protected. Before you change the numberformat, you need to
unprotect the cells.
 

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