Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can simplify that even more to become a toggle switch by using this code
ActiveSheet.Shapes("CommandButton1").Visible = Not(ActiveSheet.Shapes("CommandButton1").Visible) it will flip flop back and forth between Visible/Not Visible (True/False) each time it's called. "Bearacade" wrote: Sure there is, try this: If ActiveSheet.Shapes("CommandButton1").Visible = True Then ActiveSheet.Shapes("CommandButton1").Visible = False ElseIf ActiveSheet.Shapes("CommandButton1").Visible = False Then ActiveSheet.Shapes("CommandButton1").Visible = True End If -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=554655 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to create a command button, then assign macro to it in excel | Excel Discussion (Misc queries) | |||
Creating a macro that simulates some of the toolbar button | New Users to Excel | |||
Custom Toolbar Button No Longer Runs Assigned Macro | Excel Discussion (Misc queries) | |||
Cells turn 'hot' and execute distant macro button | Excel Discussion (Misc queries) | |||
Button not bring up Macro I created | Excel Discussion (Misc queries) |