LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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?


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW CAN I PREVENT EXCEL FILES FROM BEING DELETED OR PREVENT TRASH ROB Excel Discussion (Misc queries) 2 April 2nd 07 01:13 PM
Worksheet_Change - loop within a loop bgm Excel Programming 1 January 19th 04 01:27 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM
worksheet_change vs. calculate, and worksheet_change not running Ross[_5_] Excel Programming 0 July 13th 03 04:27 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"