Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two blocks of data on my worksheet: one with monthly dollar amounts,
and another with annual dollar amounts. I am using the Worksheet_Change event to monitor any changes to either block of data. If the user enters a monthly amount, then the annual sum is updated. If the user enters an amount in the annual total cell, then that value is divided by 12 and placed into each month. The problem is I am getting into a recursion that I don't want. For example, say the user enters $5,000 for Feb, 2009. The Worksheet_Change macro then updates the total for 2009 by adding all twelve months' data. This causes another call to Worksheet_Change (because 2009 changed), which then tries to spread the 2009 total amount amongst the months. And so on... I would appreciate any suggestions for preventing this recursion, or even another (probably easier and smarter) way to do this. Thanks, Eric -- ----------------------- If toast always lands butter-side down, and cats always land on their feet, what happen if you strap toast on the back of a cat and drop it? Steven Wright (1955 - ) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Re-starting a project but avoiding recursion??? | Excel Programming | |||
Recursion in VBA macros? | Excel Programming | |||
Abort recursion | Excel Programming | |||
Recursion | Excel Programming | |||
Worksheet_Change Recursion ARGHH! | Excel Programming |