Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default locked cell not locked

Hello
Below is my code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$N$11" Then
ActiveSheet.Protect "pass"

Else
If Target.Address = "$H$41" Then
ActiveSheet.Unprotect "pass"

This is what I want to do- when person completes cell N11 active sheet is
protected - until all cells are completed to H 41. when person completes H
41 active sheet is unprotected.
the above code works, BUT it does not recognized AB 11 as a locked cell
eventhough the cell is formatted as locked. thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default locked cell not locked

To Protect a cell, try something like this first:

Sub lock_um()
ActiveSheet.Unprotect
Range("A1").Locked = True
ActiveSheet.Protect
End Sub

--
Gary''s Student - gsnu200820


"Wanna Learn" wrote:

Hello
Below is my code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$N$11" Then
ActiveSheet.Protect "pass"

Else
If Target.Address = "$H$41" Then
ActiveSheet.Unprotect "pass"

This is what I want to do- when person completes cell N11 active sheet is
protected - until all cells are completed to H 41. when person completes H
41 active sheet is unprotected.
the above code works, BUT it does not recognized AB 11 as a locked cell
eventhough the cell is formatted as locked. thanks

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
Locked Cell Values?? KG121953 Excel Discussion (Misc queries) 0 October 4th 07 09:54 PM
Cell shading locked? Mike Excel Discussion (Misc queries) 1 May 30th 07 02:05 PM
Formula in Cell changes even if it's locked word 2003 help Excel Discussion (Misc queries) 3 May 19th 06 08:43 PM
run a macro in a locked cell Ray Excel Discussion (Misc queries) 8 January 10th 06 12:02 AM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM


All times are GMT +1. The time now is 07:04 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"