ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   change button text color (https://www.excelbanter.com/excel-programming/345887-change-button-text-color.html)

Martin Just

change button text color
 
Hiya. Have a workbook with a commandbutton called "split". The caption,
likewise, is "split" I need some vba code to change the caption's font
color from black to gray.

When I record a macro and change the ForeColor property of the button, it
only records "ActiveSheet.Shapes("split").Select" and nothing else.

TIA, Martin



barry

change button text color
 
Hi Martin

try something like this:
ActiveSheet.Shapes("split").DrawingObject.Font.Col orIndex = 15

Thanks




"Martin Just" wrote:

Hiya. Have a workbook with a commandbutton called "split". The caption,
likewise, is "split" I need some vba code to change the caption's font
color from black to gray.

When I record a macro and change the ForeColor property of the button, it
only records "ActiveSheet.Shapes("split").Select" and nothing else.

TIA, Martin





All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com