Thread: checkbox macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Search33
 
Posts: n/a
Default 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