Hi, is there a way to trigger a macro when a cell changes colour?
Thanks
Hi, is there a way to trigger a macro when a cell changes colour?
Thanks
Not directly. If a cell changes its value, you can capture the
Worksheet_Change
event to trigger a macro. But changing a cell color (or any other aspect of its formatting) does not cause this or any other event to occur.
A rather convoluted way to to this would be to create an array to record the cell colors in VBA, and capture the Select event. Every time a cell is selected you would compare all cell colors to the ones in the array to see if anything changed.
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks