Technical Q: worksheet_change event

marspu

New Member
Joined
Jan 23, 2009
Messages
3
Hi - I am using the worksheet_change event to change the background colour of cells (based on the MrExcel Office VBA Macros book). When the values are typed in manually eveything works fine....but I am populating the cells using an index function which links to another spread and when I change the value in the linked spread, whilst the value changes here correctly, the colour (triggered by the worksheet_change) doesn't. Is there an alternative event I can use so I don't have to update hundreds of cells manually?

Thanks in advance for your help - Mark
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You could try using Worksheet_Calculate(). This doesn't have a Target parameter so you would possibly need to loop through the range of interest.
 
Upvote 0
Thanks for the quick response! When you say 'loop thru the range of interest '- if multiple cells are being changed as a result of the links will this trigger one event for all of them which I then need to loop thru by defining a target range (since this event doesn't use one) or would they trigger separate calculate events?
 
Upvote 0
When the sheet calculates it triggers a single Worksheet_Calculate event.
 
Upvote 0

Forum statistics

Threads
1,216,087
Messages
6,128,740
Members
449,466
Latest member
Peter Juhnke

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