Hi all,
I have created a function which runs on Worksheet_Calculate() event. i used Worksheet_Calculate event as a workaround in order to capture the state in table filters and display the selected filters as there is no Worksheet_Filterupdate() event. so far all is good but,
as i got sheet A and B with B having references to A, the problem is that every time i change data in sheet A, sheet B Worksheet_Calculate is also triggered creating nested function calls.
i tried using a doNotRun boolean flag which is set to false in the beginging of my function and to true at the end as the function itself triggers Worksheet_Calculate. but some times the reference sheet Worksheet_Calculate() fires before the sheet that was directly modified so this solution doesnt seem to be very stable.
i also tried setting Application.Calculation = xlCalculationSemiautomatic or xlCalculationManual but no luck...
i was thinking if there was a way to know the sheet who's Worksheet_Calculate() is running i could ommit it if it is not the intentional
any ideas/advice as to how to work around this?
Bookmarks