Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
Any assistance would be much appreciated. I'd like to use a togglebuttom to Show / Hide a Shape in a worksheet (in this case Rectangle 3). The hide part is easy with using Visible = False but the show part is hanging me up. Something tells me that this is a little more complicated than it sounds because the shape is held in memory location, which means that if it is hidden at the time the file is opened it needs to be loaded into memory. Maybe I'm over complicating things? TIA Pete |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pete,
I think you might be. If you use a togglebutton from the Control Toolbox, double-click it and add this code to it's click event it will toggle. If it's not visible when you open the workbook, clicking the button will make it so. Private Sub ToggleButton1_Click() Worksheets("Sheet1").Shapes("Rectangle 3").Visible = Not (Shapes("Rectangle 3").Visible) End Sub hth, Doug Glancy "Pete Csiszar" wrote in message news:QI%Bd.47642$KO5.25511@clgrps13... Hi All, Any assistance would be much appreciated. I'd like to use a togglebuttom to Show / Hide a Shape in a worksheet (in this case Rectangle 3). The hide part is easy with using Visible = False but the show part is hanging me up. Something tells me that this is a little more complicated than it sounds because the shape is held in memory location, which means that if it is hidden at the time the file is opened it needs to be loaded into memory. Maybe I'm over complicating things? TIA Pete |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If visible = False hides it, then visible = true should show it.
-- Regards, Tom Ogilvy "Pete Csiszar" wrote in message news:QI%Bd.47642$KO5.25511@clgrps13... Hi All, Any assistance would be much appreciated. I'd like to use a togglebuttom to Show / Hide a Shape in a worksheet (in this case Rectangle 3). The hide part is easy with using Visible = False but the show part is hanging me up. Something tells me that this is a little more complicated than it sounds because the shape is held in memory location, which means that if it is hidden at the time the file is opened it needs to be loaded into memory. Maybe I'm over complicating things? TIA Pete |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pete
I think you are overcomplicating things. Private Sub ToggleButton1_Change() ActiveSheet.Shapes("Rectangle 3").Visible = Not (ActiveSheet.Shapes("Rectangle 3").Visible) End Sub will probably do what you want. Good luck. Ken Norfolk, Va |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Name of the sheet - hide and show | Excel Discussion (Misc queries) | |||
Hide n' show cells in protected sheet | Excel Worksheet Functions | |||
Showing + and - (show and hide) for rows in the sheet | Excel Worksheet Functions | |||
Why can't I show or hide rows in an outline on a protected sheet? | Excel Discussion (Misc queries) | |||
Hide/show sheets by first part of sheet name | Excel Programming |