Color Font to White

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
946
Office Version
  1. 2016
Platform
  1. Windows
Code:
Range("B4:F4").Select
With Selection
.Interior.ColorIndex = 1
.Font.Name = "Calibri"
.Font.Size = 12
.Font.ColorIndex = 0
End With

Hello All,
I'm trying to write a simple code that will turn range B4:F4 Fill to Black, but the font to white, so it will show in the black field. I'm having trouble turning the font to white. Everything else is working.
Thanks for the help
excel 2013
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
getting back to this problem, I still am not able to get the font to have a white color to show up on the black background.
My code is:

Code:
Range("B4:F4").Select
With Selection
.Interior.ColorIndex = 1
.Font.Name = "Calibri"
.Font.Size = 12
.Font.Color = 1

Thanks for the help
 
Upvote 0
It should be
Code:
.Font.ColorIndex = 2
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

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