#1   Report Post  
Posted to microsoft.public.excel.misc
Dajana
 
Posts: n/a
Default 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

  #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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Macro for checkbox (2) es Excel Discussion (Misc queries) 0 April 5th 05 01:48 PM
Macro for checkbox (2) es Excel Discussion (Misc queries) 0 April 5th 05 01:48 PM
Macro for checkbox es Excel Discussion (Misc queries) 1 April 5th 05 11:40 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM


All times are GMT +1. The time now is 06:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"