Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button Active X controls
I have six command buttons that filter a sheet based on criteria. I have the
filter built. I want to see if someone can provide me with code to make the command button look selected or filled grey when it is selected. Of course when one is selected I need the others to be turned off. Can anyone help me. Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button Active X controls
hi
you might try something like this... Private Sub Commandbutton2_Click() With Commandbutton2 .BackColor = RGB(0, 0, 255) ' blue .Caption = "Selected" .ForeColor = RGB(245, 245, 6) 'yellow End With Commandbutton3.Enabled = False run your code here? End Sub see this site for RGB colors.... http://www.mvps.org/dmcritchie/excel/colors.htm but a word of caution. if you are going to disable a control, you need a way to enable it again. I would suggest that at the end of the code that the selected button runs, you enable all of the buttons that you disabled and change all the colors back. Regards FSt1 "Kenny" wrote: I have six command buttons that filter a sheet based on criteria. I have the filter built. I want to see if someone can provide me with code to make the command button look selected or filled grey when it is selected. Of course when one is selected I need the others to be turned off. Can anyone help me. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Active-X Controls - Transfer to Mac (excel) | Excel Discussion (Misc queries) | |||
Merge command not active | Excel Worksheet Functions | |||
Active X Controls | New Users to Excel | |||
How do I stop active x controls from moving after a print preview | Excel Discussion (Misc queries) | |||
Active X controls | Excel Discussion (Misc queries) |