VBA font color change ?

audrey

Active Member
Joined
Jul 30, 2008
Messages
491
Hello,
with a checkbox button, I would like to have;

- Font change color (from white to black, black to white)
- Background change color (from white to black, black to white)

is that possible ?

It s not the whole sheet it should apply, lets say only A1:b3

Thanks for your help!
 
Hi. Thanks, but I'm trying to get the coding to use in the format cells editor (snapshot below). for basic colors such as red and blue, you can put [Red] or [Blue] at the beginning of the format definition, but I am hoping to use the 175,11,28 color rather than Red or Blue, and I'm not sure of the syntax.

 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
sorry, i guess i'm not able to upload a jpg. i'm clear on specifying font color in VBA, but trying to figure out how to do it in a custom number definition in the actual excel Format Cells dialog.
 
Upvote 0
sorry, i guess i'm not able to upload a jpg. i'm clear on specifying font color in VBA, but trying to figure out how to do it in a custom number definition in the actual excel Format Cells dialog.

-------------------------

You most likely already know this and that is why you are on Mr.Excel....

but I find this on the Web.

"I am afraid that many properties of Excel objects are accessible only from VBA. But the info you want can be obtained with a 3-liner and you can use such a user-defined formula within your excel sheets just like a built-in formula. If wanted I can post a VBA solution for you. The =CELL("color"..) pertains to contitional formatting – "
 
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