View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach
 
Posts: n/a
Default Set number format based on cell contents

I would guess that you somehow skipped over the line:
Application.EnableEvents = True
when you were running the macro. This can happen when you incur an error
and the code execution stops. That sets Excel to not recognize any events
and it stays that way until you manually reset Excel, which you did. If
this happens again then we need to put an error trap in the code somewhere.
Post back if this happens again. HTH Otto
"nospaminlich" wrote in message
...
Thanks a lot Otto.

Tried everything you suggested but it still didn't work so I did the
Ctrl-Alt-Del routine and having restarted Windows and Excel the code works
perfectly. Don't understand why it needed a system restart but I'm just
delighted it works.

Thanks again