Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
change forecolor with code
I have some labels on a userform that I set the forecolor property to
&H80000011& (Disabled Text). I want to be able to change the forecolor between "Disabled Text" and "Button Text" (and vice versa) with code. I know I can use RGB values, but I was hoping to use the same colors that are listed in the properties box, so it matches other labels on the form. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
change forecolor with code
hi
see this site for xl colors. it lists the index number, the hexidecimal, the RGB ect it list standard colors only. http://www.mvps.org/dmcritchie/excel/colors.htm the code? label1.forecolor = yourcolor or commandbutton1.forecolor = yourothercolor regards FSt1 "Horatio J. Bilge, Jr." wrote: I have some labels on a userform that I set the forecolor property to &H80000011& (Disabled Text). I want to be able to change the forecolor between "Disabled Text" and "Button Text" (and vice versa) with code. I know I can use RGB values, but I was hoping to use the same colors that are listed in the properties box, so it matches other labels on the form. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
change forecolor with code
Not quite what I was hoping for, but there is a ton of information on that
page, and I made it work. I used color detector to get the rgb value for the "Disabled Text" color, and then used that in my code. Thanks. "FSt1" wrote: hi see this site for xl colors. it lists the index number, the hexidecimal, the RGB ect it list standard colors only. http://www.mvps.org/dmcritchie/excel/colors.htm the code? label1.forecolor = yourcolor or commandbutton1.forecolor = yourothercolor regards FSt1 "Horatio J. Bilge, Jr." wrote: I have some labels on a userform that I set the forecolor property to &H80000011& (Disabled Text). I want to be able to change the forecolor between "Disabled Text" and "Button Text" (and vice versa) with code. I know I can use RGB values, but I was hoping to use the same colors that are listed in the properties box, so it matches other labels on the form. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Code to Change the Tab Name | Excel Discussion (Misc queries) | |||
VBA Code to Change the Tab Name | Excel Discussion (Misc queries) | |||
change SUMIF formula into a vb code | Excel Discussion (Misc queries) | |||
combo box on change code | Excel Discussion (Misc queries) | |||
change the code to be a formula | Excel Discussion (Misc queries) |