LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default Locking/Unlocking cells upon condition

I have put the following code into the worksheet code but it doesn't work.
Can someone put me straight please?

Private Sub PERSONAL_LOCK()
If Range("add.years.1").Value < 3 Then
ActiveSheet.UNPROTECT
ActiveSheet.Range("add.prv.1:add.prv.yrs.2").Locke d = False
ActiveSheet.Protect
End If
End Sub

Thanks, Brett

 
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
Unlocking protected cells Vanilla Skies Excel Worksheet Functions 0 September 26th 06 04:04 AM
Unlocking cells Vanilla Skies Excel Worksheet Functions 1 September 25th 06 04:30 AM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
conditional unlocking of cells hiryuu Excel Worksheet Functions 1 October 19th 05 12:44 PM
Unlocking Cells when a worksheet is protected... racmb1975 Excel Discussion (Misc queries) 2 May 3rd 05 08:57 PM


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

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

About Us

"It's about Microsoft Excel"