Problem with Worksheet_Change Event

Rocky0201

Active Member
Joined
Aug 20, 2009
Messages
278
Hi...

I have a sheet with a Worksheet_Change event. This event works great when the user manually chnages a cell in the targeted range.

My problem is, if I change a cell from another routine, Worksheet_Change is activated and the cell range that I'm changing causes the code to run in Worksheet_Change. It causes a loop that the only way I can stop it is through the Task Manager.

Is there a way to prevent the Worksheet_Change event from occuring if the cell is being updated from a routine instread of manually changing the cell? I still would want the event to kick off if the cell was changed manually.

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I think I got it.

I disabled events - Application.EnableEvents = False and then enabled events after I updated my cells.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,216,071
Messages
6,128,623
Members
449,460
Latest member
jgharbawi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top