Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a subroutine (cutdown version below) which should lock and unlock
cells based on a cell content. Private Sub ComboBox2_Change() Worksheets(1).Unprotect Application.ScreenUpdating = False ' ----- 17cm CHECK ----- If Range("w3").Value = 17 Then Range("e9:o9").Locked = True Else Range("e9").Locked = False Range("h9:i9").Locked = False Range("k9").Locked = False Range("m9:o9").Locked = False End If Worksheets(1).Protect Application.ScreenUpdating = True End Sub W3 is the linked cell to combobox2. If w3=17, there appears to be no problem, though the cells are already locked. If w3<17 I get an eror telling me that the Locked property can not be set on the Range class. It nust be something straightforward, but I can't see what. Any ideas? TIA Ian |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking/Unlocking based on another cell value | Excel Worksheet Functions | |||
locking and unlocking worksheets | Excel Worksheet Functions | |||
Locking/Unlocking cells upon condition | Excel Discussion (Misc queries) | |||
locking and unlocking a row of data based on whats entered in a cell | Excel Programming | |||
Locking/Unlocking a VBA Project in 2000 vs '97 - Difference? | Excel Programming |