Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to add another IF statement into my worksheet change code that will unhide columns "R:R to T:T" if a value in the range O18:O32 = "wordswrittenincell" but do nothing if no values in that range = "samewords" I am wanting the columns to unhide as soon as someone enters the magic word within that range... I have the following already in my sheet code: Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Me.Range("C18:X32,C37:H43"), .Cells) Is Nothing Then Application.EnableEvents = False Me.Unprotect (PWORD_Worksheet) With Me.Range("E1") .NumberFormat = "dd mmm yyyy hh:mm:ss" .Value = Now End With Me.Protect (PWORD_Worksheet) Application.EnableEvents = True End If End With End Sub Can anyone help me with this? TIA, Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet_Change Event with Range Protection | Excel Discussion (Misc queries) | |||
Lock or Unlock Range of Cells on Worksheet_Change Event | Excel Worksheet Functions | |||
Checkbox to Hide/Unhide Columns Based on Value in Cell | Excel Programming | |||
Using Named Range in Worksheet_Change event | Excel Programming | |||
Hide or Unhide certain columns based on a cell value | Excel Programming |