Is there an excel add-in or vba code to track change events in any active workbook or active worksheet ?

fourdragons

New Member
Joined
Mar 18, 2019
Messages
8
Hi,
I was just creating a function to display the color index of the selected cell, the code works fine. The problem is that whenever the referred cell's color is changed, the function doesn't update itself automatically, we would have to set focus on the cell with the formula to get it updated . Is there any solution to this?

I was thinking of an add-in that can easily track the change event of any active worksheet which may in-turn be used to update this function automatically.
Please let me know if there is an add-in or any other way to solve this?

VBA Code:
Function color_index(ByRef rng As range)
     color_index = rng.Interior.ColorIndex
End Function

Thanks in advance
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
There is no way to detect that the format of a cell has changed. One workaround would be to have a selection change event that re-calculates the sheet, but if you change the format nothing will happen until you select a different cell.
 
Upvote 0

Forum statistics

Threads
1,215,551
Messages
6,125,478
Members
449,233
Latest member
Deardevil

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