Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I know how to toggle say..the grid....on or off, using a button. But,
how do I toggle cell interior color on/off. Specifically, I want to click on a button and make a "No Fill" cell yellow, or a yellow cell "No Fill". I am using Excel 2002. As usual, thanks for any and all help. Tonso |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Off your worksheet enter into it's code module:
Private Sub CommandButton1_Click() If ActiveCell.Address(0, 0) < "A1" Then 'Chg to Suit ActiveCell.Select Exit Sub Else With Range("A1") 'Cng to suit If .Interior.ColorIndex = 6 Then .Interior.ColorIndex = xlNone Else .Interior.ColorIndex = 6 End If End With End If ActiveCell.Select End Sub Add a Command button1 using the Control toolbox and you're good to go.. "Tonso" wrote: I know how to toggle say..the grid....on or off, using a button. But, how do I toggle cell interior color on/off. Specifically, I want to click on a button and make a "No Fill" cell yellow, or a yellow cell "No Fill". I am using Excel 2002. As usual, thanks for any and all help. Tonso |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toggle Button oddity | Excel Discussion (Misc queries) | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
Protect Workbook vs Worksheet?? | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
Creating button as cell | Excel Discussion (Misc queries) |