View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_50_] p45cal[_50_] is offline
external usenet poster
 
Posts: 107
Default Worksheet_Change

it'll be:
Compile error. Ambiguous name detected:Worksheet_Change
--
p45cal


"FSt1" wrote:

hi.
what is the ambiguous message?

regards
FSt1

" wrote:

Hi Guys,

I have tried to use the code:

Private Sub Worksheet_Change(ByVal Target As Range)

Rows("6:18").EntireRow.Hidden = False
Rows("20:37").EntireRow.Hidden = False

If Range("c5") = "1" Then
Rows("13:18").EntireRow.Hidden = True
ElseIf Range("c5") = "2" Then
Rows("20:37").EntireRow.Hidden = True
End If


End Sub

The code works ok with one change event. I would like to use it 3-4
times in a worksheet, but get an ambiguous message.

Any ideas