Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default macro to operate in protected cells

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default macro to operate in protected cells

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


"HGood" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default macro to operate in protected cells

This worked great, now I can always keep the entire sheet protected!

Thanks,

Harold
=================
"Paul B" wrote in message
...
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


"HGood" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to unlock and lock cells in password protected sheet Chris Excel Discussion (Misc queries) 3 February 26th 10 09:06 PM
Macro to clear checkboxes and protected cells Guy[_2_] Excel Worksheet Functions 2 December 29th 08 08:54 PM
Edit text format in non-protected cells in protected worksheet Bonnie Excel Discussion (Misc queries) 2 April 19th 08 04:48 PM
Macro with protected cells. JD Excel Programming 3 July 21st 04 11:49 PM
Can Excel operate as Database? ND Excel Programming 1 September 18th 03 05:06 PM


All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"