View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Batshon Batshon is offline
external usenet poster
 
Posts: 6
Default VB - With protected sheet

Dear Guys,

i have a simple Marco that basically hides some rows and columns when i pick
the hide option froma drop down list.

The problem is i protected the sheet, (but not the drop down list of course)
and when i choose the hide option, nothing happens!

The code is written below

Any suggestion is appreciated..

Thanks!


Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Reset
With Application
.EnableEvents = False
If Not Application.Intersect(Me.Range("T75"), Target) Is Nothing Then
Me.Rows("76:92").Hidden = (UCase(Target.Value) = "HIDE")
End If
If Not Application.Intersect(Me.Range("t6"), Target) Is Nothing Then
Me.Rows("7").Hidden = (UCase(Target.Value) = "HIDE")
End If
.EnableEvents = True
End With
Exit Sub


Reset:
Application.EnableEvents = True
End Sub