macro to operate in protected cells

  • Thread starter Thread starter HGood
  • Start date Start date
H

HGood

I'm new to macros.

I've recorded a simple macro that copies the bottom line of a cash entry
form (seven columns wide), then inserts the copied range as a new empty line
to enter data in.

But I want to Protect the spreadsheet so others can't change formulas and
mess things up.

I can't make the macro work properly when I protect the spreadsheet. I've
even tried unlocking the rows beneath my data entry rows, so as to allow
expansion into that Unlocked space, but doesn't help.

Can anyone help me with this.

Thanks,

Harold
 
HGood, one way is to unprotect the sheet run your code and then protect the
sheet, something like this

ActiveSheet.Unprotect password:="123"

'you code here

ActiveSheet.Protect password:="123"
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
This worked great, now I can always keep the entire sheet protected!

Thanks,

Harold
=================
 

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

Back
Top