View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HotRod HotRod is offline
external usenet poster
 
Posts: 147
Default How to prevent Worksheet_Change loop?

OK I'm not sure what to do about this but I have some code running in the
Worksheet_Change(ByVal Target As Range) EVENT. This is just one of the
examples but when a user enters a space " " in a cell the code inputs the
default value, the code also formats values that are manually entered. The
problem I'm having is that I may change the "Target.Value" several times and
every time I change it the "Worksheet_Change" EVENT is fired again. When I
input a space for the default address the Worksheet_Change EVENT is fired
500 times. How do I get around this? Since the code is a few Nested IF
statements the code is jumping all over the place.

The only thing I'm thinking of is moving the Target.value into a variable
first and then start working with it. Would this work?