Sub Worksheet_Change

vhanacek

New Member
Joined
Jul 12, 2005
Messages
42
Hi everybody
Does any SUB exist like "Sub Worksheet_Change" , but the sub should be called only if cells in some range of the sheet are changed?....to save the time
I use there a function which put some values into some cells, what means that the worksheet is changed again and the SUB is called again and again.
Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi

Within the worksheet change event sub, turn off the events

application.enableevents = false

Then do you processing.

Remember to change it back again at the end of the sub

application.enableevents = true

It is often worthwhile to put in an error trap to make sure the events are turned on again just in case.

HTH

Tony
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,377
Members
448,955
Latest member
BatCoder

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