checkbox macro
I have created a macro:
Private Sub CheckBox131_Click() Range("C26:G26").Select Selection.Font.ColorIndex = 5 whenever I click the checkbox the text changes the color. However if I uncheck the checkbox I would like the colour to go back to automatic black. And then if I check it again I would like text to change color. thanks Dajana |
checkbox macro
Hi Dajana,
Try this Sub CheckBox1_Click() ActiveSheet.Shapes("check box 131").Select If Selection.Value = xlOn Then Range("C26:G26").Select Selection.Font.ColorIndex = 5 Else Range("C26:G26").Select Selection.Font.ColorIndex = 1 End If - Search "Dajana" wrote: I have created a macro: Private Sub CheckBox131_Click() Range("C26:G26").Select Selection.Font.ColorIndex = 5 whenever I click the checkbox the text changes the color. However if I uncheck the checkbox I would like the colour to go back to automatic black. And then if I check it again I would like text to change color. thanks Dajana |
All times are GMT +1. The time now is 01:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com