View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Hiding graphics elements?

Let's say one of your rectangles is named "Rectangle 1", then you can hide
it like this...

Worksheets("Sheet1").Shapes("Rectangle 1").OLEFormat.Object.Visible = False

Setting the above line to True instead of False will show the rectangle
again. In place of the name "Rectangle 1", you can use its Index number if
you know it...

Worksheets("Sheet1").Shapes(1).OLEFormat.Object.Vi sible = False

--
Rick (MVP - Excel)



"Blue Max" wrote in message
...
How can we hide pre-selected groups of graphics elements with the touch of
a cell or control?

We have two distinct groups of rectangles with gradient fills. Depending
on the state (true/false) of a control, we want one or the other group of
rectangles to be hidden while the other is displayed. Can anyone give us
some direction on how we might accomplish this? Unlike controls, we don't
see where rectangles have a property for visibility or for hiding the
object.