ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unprotect column (https://www.excelbanter.com/excel-programming/320644-unprotect-column.html)

SueJB

Unprotect column
 
Hi all

I have a worksheet that is either unprotected (to allow editing) or
protected (to allow viewing only) depending on a user login and password.
However, unprotection allows access to the entire sheet and now I need to
permit one user to edit one column only.

Is there a way to unprotect a single column in an otherwise protected
worksheet?

Thanks in advance!
SB



Tom Ogilvy

Unprotect column
 
In xl2002 and later. What version is the lowest that will need to work with
the sheet?

--
Regards,
Tom Ogilvy

"SueJB" wrote in message
...
Hi all

I have a worksheet that is either unprotected (to allow editing) or
protected (to allow viewing only) depending on a user login and password.
However, unprotection allows access to the entire sheet and now I need to
permit one user to edit one column only.

Is there a way to unprotect a single column in an otherwise protected
worksheet?

Thanks in advance!
SB





gocush[_29_]

Unprotect column
 
Try something like:


If logon User = xxx then
Activesheet.unprotect Password:="Hello"
Range("C:C").Locked=False
Activesheet.Protect Password:="Hello"
End if

Then in the wbk_BeforeClose event, reverse this to lock your col C


"SueJB" wrote:

Hi all

I have a worksheet that is either unprotected (to allow editing) or
protected (to allow viewing only) depending on a user login and password.
However, unprotection allows access to the entire sheet and now I need to
permit one user to edit one column only.

Is there a way to unprotect a single column in an otherwise protected
worksheet?

Thanks in advance!
SB



SueJB

Unprotect column
 
Hello Tom

The lowest version will be 2002 (which we are currently using) but I'll need
to port to 2003 later this year

Thanks for such a quick response
S

"Tom Ogilvy" wrote:

In xl2002 and later. What version is the lowest that will need to work with
the sheet?

--
Regards,
Tom Ogilvy

"SueJB" wrote in message
...
Hi all

I have a worksheet that is either unprotected (to allow editing) or
protected (to allow viewing only) depending on a user login and password.
However, unprotection allows access to the entire sheet and now I need to
permit one user to edit one column only.

Is there a way to unprotect a single column in an otherwise protected
worksheet?

Thanks in advance!
SB






SueJB

Unprotect column
 
That's great - and SO simple - why didn't I think of that?

Many thanks for such a quick response

Sue

"gocush" wrote:

Try something like:


If logon User = xxx then
Activesheet.unprotect Password:="Hello"
Range("C:C").Locked=False
Activesheet.Protect Password:="Hello"
End if

Then in the wbk_BeforeClose event, reverse this to lock your col C


"SueJB" wrote:

Hi all

I have a worksheet that is either unprotected (to allow editing) or
protected (to allow viewing only) depending on a user login and password.
However, unprotection allows access to the entire sheet and now I need to
permit one user to edit one column only.

Is there a way to unprotect a single column in an otherwise protected
worksheet?

Thanks in advance!
SB




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com