Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically hide an object - Excel 2003 or 2007
We have a need to programmatically hide some objects in Excel. We can do it
in PowerPoint because it is easy to define the slide number and object number. But how to do it in Excel? My searches through Help only show how to hide a worksheet. This is what we currently have: Sub Hide_Objects() ActiveSheet.Shapes("Object 1").Visible = False ActiveSheet.Shapes("Object 2").Visible = False End Sub Thank you for any help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically hide an object - Excel 2003 or 2007
Here are three ways:
Sub HideAndSeek1() Dim s As Shape For Each s In ActiveSheet.Shapes s.Visible = msoFalse Next End Sub Sub HideAndSeek2() ActiveSheet.Shapes(1).Visible = msoFalse End Sub Sub HideAndSeek3() ActiveSheet.Shapes("Rectangle 1").Visible = msoFalse End Sub -- Gary''s Student - gsnu200843 "Sue" wrote: We have a need to programmatically hide some objects in Excel. We can do it in PowerPoint because it is easy to define the slide number and object number. But how to do it in Excel? My searches through Help only show how to hide a worksheet. This is what we currently have: Sub Hide_Objects() ActiveSheet.Shapes("Object 1").Visible = False ActiveSheet.Shapes("Object 2").Visible = False End Sub Thank you for any help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 to 2007 issues - Drawing object groups | Excel Programming | |||
Programmatically Protect/Unprotect Ranges in Excel 2003? | Excel Programming | |||
Removing Add-ins programmatically from Excel 2003 using VBScript | Excel Programming | |||
Programmatically set Excel 97 Control Toobar Checkbox object & container name | Excel Programming | |||
Programmatically inserting a row with Excel 2003 | Excel Programming |