Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all,
Presently, I am doing a VB Coding for a Worksheet in which I want to control the sheet. I just want to know if there is any possibility of locking or unlocking the cells with out Unprotect/Protect Commands. For example, In Cell A1, if I select "Boiler"(from drop down list), then Cells A2,A3 and A4 should be locked so that user cannot write anything over there. Suppose if I select "Kiln",in A1, immediately the cells A2,A3,A4 should be unlocked. The problem I am facing is like this.. Private Sub Worksheet_Change(ByVal h1 As Range) Application.ScreenUpdating = False If h1.Row = 12 And h1.Column <= 7 Then If h1.Value = "Boiler" Then Range(Cells(13, h1.Column), Cells(15, h1.Column)).Locked = True Else Range(Cells(13, h1.Column), Cells(15, h1.Column)).Locked = False End If End If My program is protected already by default and the password is around 45 characters. Hence I do not wanrt to put the protect / unprotect command in the above coding. Is it possible to use any application events for performing the above coding successfully. Regards, Premanand S |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking/Unlocking based on another cell value | Excel Worksheet Functions | |||
Sheet protection/unprotection | Excel Programming | |||
Conditional Cell Locking/Unlocking | Excel Programming | |||
Unlocking and locking a specific cell | Excel Programming | |||
locking and unlocking a row of data based on whats entered in a cell | Excel Programming |