View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Worksheet_Change problem

one big typo on my part

Errhandler:
Application.EnableEvent = True

should be

ErrHandler:
Application.EnableEvents = True

Put an s on EnableEvent.

--
Regards,
tom Ogilvy



"Alex" wrote:

The below code runs fine if cell B5 has changed. However, if I replace B5 in
the code below with E5, the code runs even if Range("AA5").Value = "". It
only runs once though and at the end I get an error box, "application defined
or object define error?" I can replace the below code with any cell except
E5 and it works perfectly. I've tried changing the format of cell E5 and
various other things and I still can't get it to work. Any ideas?

On Error goto ErrHandler

If Target.Address = "$B$5" And Range("AA5").Value < "" Then
Application.EnableEvents = False
Call Input_FieldsNoPartNumber
End If

ErrHandler:
Application.EnableEvent = True

End Sub