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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

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