how to preserve fill color when hiding/unhiding column with vba

steve harris

New Member
Joined
Dec 31, 2005
Messages
4
When "No" appears in a cell of a dynamic range I set the fill color to red in vba. A macro gives the option of hiding/unhiding the column containing this range. On unhiding the column, red is gone. How do I preserve the fill color without having to go through the range cell-by-cell on unhiding?

I am using Excel 2007.

(I notice that the same thing happens if I hide / unhide a column from the ribbon.)
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
****SOLVED****

Problem was not what I thought. Symptoms I stated are incorrect. I was re-setting Interior.ColorIndex in another sub. My apologies.

When "No" appears in a cell of a dynamic range I set the fill color to red in vba. A macro gives the option of hiding/unhiding the column containing this range. On unhiding the column, red is gone. How do I preserve the fill color without having to go through the range cell-by-cell on unhiding?

I am using Excel 2007.

(I notice that the same thing happens if I hide / unhide a column from the ribbon.)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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