Calculate on Format Change

rvences

New Member
Joined
Feb 21, 2002
Messages
9
I created a custom function (using VBA) that returns the Excel Color Index of a particular cell. The function works fine, however, when changing the color format of my "target cell" my custom function does not update to indicate the target cell's new color index. I only get the update once I manually recalculate (F9) or the spreadsheet recalculates by entering data into another cell. My auto calculate is enabled, and I did use the "Application.Volatile" feature in my code. Apparently a format change alone does not cause Excel to recalculate the spread sheet. I've also tried adding "calculate" to my code, which doesn't work. How can I get my custom function to "refresh" after a format change to a cell?
 
I think this code above is something along the right path of what I am looking for. My programming is very limited, basically zero, so I am unsure.

What I am looking for...I have a worksheet named "Takeoff" and on this worksheet I have cells that have various font colors (These font color are important and should not be changed). If a user tries to change the font colors I would like them prompted with a dialog box stating "Font Color Change - Are you sure?" then a yes or no answer. Is this possible by modifying the code above??? Thanks in advance.
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,213,494
Messages
6,113,988
Members
448,538
Latest member
alex78

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