Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Lock Unlock Cell Protection

I have a spreadsheet that has a range A5:H30 being used as a list of product
numbers entered in Column A (A5:A30) and a vlookup in the remainder range
b5:h30 (locked cells) to fill in the remaining order information. Range
G5:G30 (locked) is the Rate. I protect the sheet to allow only unlocked
cells to be selected to ensure data integrity. My issue is that now I have
certain product numbers that have a variable Rate that needs to be entered
at the time the order is being entered. Is there a way to unprotect the
sheet, unlock Range G(whatever row contains the variable product number) so
that the variable rate can be entered, and then once entered, set the order
form back to the protected state. I can probably work the code but just
don't know the property to change the cell protection option. I thank you
in advance!

Amb

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Lock Unlock Cell Protection

Hi Mike,

I am taking it you don't want to manually unprotect the worksheet.

Once unprotected it does not matter if a cell is locked or unlocked.

You can write a macro that will unpassword protect the sheet . You can then
have an alternate macro that protects. You can place these macros in your
personal macro folder so nobody else can run them.

To unprotect:

ActiveSheet.Unprotect Password:=""

To protect:

ActiveSheet.Protect Password:=""


Your password goes in the "".


"Mike Josephson" wrote:

I have a spreadsheet that has a range A5:H30 being used as a list of product
numbers entered in Column A (A5:A30) and a vlookup in the remainder range
b5:h30 (locked cells) to fill in the remaining order information. Range
G5:G30 (locked) is the Rate. I protect the sheet to allow only unlocked
cells to be selected to ensure data integrity. My issue is that now I have
certain product numbers that have a variable Rate that needs to be entered
at the time the order is being entered. Is there a way to unprotect the
sheet, unlock Range G(whatever row contains the variable product number) so
that the variable rate can be entered, and then once entered, set the order
form back to the protected state. I can probably work the code but just
don't know the property to change the cell protection option. I thank you
in advance!

Amb

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Lock Unlock Cell Protection

Squeaky,

Actually I'm talking about just unprotecting that cell based on product
number, I don't want to allow users to manually unprotect the sheet, and
also if i unprotect the sheet i want to immediately protect the sheet again
after they enter the variable rate so that they cannot modify the other
protected cells...would I just reprotect after a change event?

thanks,
Amb

"Squeaky" wrote in message
...
Hi Mike,

I am taking it you don't want to manually unprotect the worksheet.

Once unprotected it does not matter if a cell is locked or unlocked.

You can write a macro that will unpassword protect the sheet . You can
then
have an alternate macro that protects. You can place these macros in your
personal macro folder so nobody else can run them.

To unprotect:

ActiveSheet.Unprotect Password:=""

To protect:

ActiveSheet.Protect Password:=""


Your password goes in the "".


"Mike Josephson" wrote:

I have a spreadsheet that has a range A5:H30 being used as a list of
product
numbers entered in Column A (A5:A30) and a vlookup in the remainder range
b5:h30 (locked cells) to fill in the remaining order information. Range
G5:G30 (locked) is the Rate. I protect the sheet to allow only unlocked
cells to be selected to ensure data integrity. My issue is that now I
have
certain product numbers that have a variable Rate that needs to be
entered
at the time the order is being entered. Is there a way to unprotect the
sheet, unlock Range G(whatever row contains the variable product number)
so
that the variable rate can be entered, and then once entered, set the
order
form back to the protected state. I can probably work the code but just
don't know the property to change the cell protection option. I thank
you
in advance!

Amb


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Lock Unlock Cell Protection


Mike, Squeaky's solution is correct, if you only want to unprotect a
certain cell then you need to tell us the value that you want to
trigger the change, can the value be cleared once found?...we need a
little more informationMike Josephson;421258 Wrote:
Squeaky,

Actually I'm talking about just unprotecting that cell based on product
number, I don't want to allow users to manually unprotect the sheet,
and
also if i unprotect the sheet i want to immediately protect the sheet
again
after they enter the variable rate so that they cannot modify the other
protected cells...would I just reprotect after a change event?

thanks,
Amb

"Squeaky" wrote in message
...
Hi Mike,

I am taking it you don't want to manually unprotect the worksheet.

Once unprotected it does not matter if a cell is locked or unlocked.

You can write a macro that will unpassword protect the sheet . You

can
then
have an alternate macro that protects. You can place these macros in

your
personal macro folder so nobody else can run them.

To unprotect:

ActiveSheet.Unprotect Password:=""

To protect:

ActiveSheet.Protect Password:=""


Your password goes in the "".


"Mike Josephson" wrote:

I have a spreadsheet that has a range A5:H30 being used as a list of
product
numbers entered in Column A (A5:A30) and a vlookup in the remainder

range
b5:h30 (locked cells) to fill in the remaining order information.

Range
G5:G30 (locked) is the Rate. I protect the sheet to allow only

unlocked
cells to be selected to ensure data integrity. My issue is that now

I
have
certain product numbers that have a variable Rate that needs to be
entered
at the time the order is being entered. Is there a way to unprotect

the
sheet, unlock Range G(whatever row contains the variable product

number)
so
that the variable rate can be entered, and then once entered, set

the
order
form back to the protected state. I can probably work the code but

just
don't know the property to change the cell protection option. I

thank
you
in advance!

Amb



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116927

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
hoW TO LOCK AND UNLOCK A CELL USING A FUNCTION/FORMULA Ridhi Excel Worksheet Functions 6 April 23rd 08 05:41 AM
FORMULA/FUNCTION TO LOCK AND UNLOCK A CELL Ridhi Excel Discussion (Misc queries) 2 April 21st 08 11:03 AM
How to lock and unlock a cell using formulas in excel Ridhi Excel Discussion (Misc queries) 1 April 19th 08 11:33 AM
Protection - Allow Group/Ungroup but lock / unlock some cells LinLin Excel Discussion (Misc queries) 2 November 18th 07 10:31 PM
Lock or Unlock cell references in a formula for auto fill purposes David P. Excel Discussion (Misc queries) 2 June 6th 05 11:18 PM


All times are GMT +1. The time now is 06:49 AM.

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"