View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Hiding objects based on property of object

Bert,
Not sure if Excel is the best for this. PowerPoint ?
Anyway something like this, with whatever your objects and properties are,
should get you started:

Private Sub CommandButton1_Click()
Dim Shapeobj As Shape

'Loop through all the shapes on the sheet
For Each Shapeobj In ThisWorkbook.ActiveSheet.Shapes
With Shapeobj
Select Case .AutoShapeType
'Decide which type of object tests which property for visibilty
Case msoShapeFlowchartDecision
.Visible = (.Width 10)
Case msoShapeFlowchartConnector
.Visible = (.Height 20)
'.
'.
'.

Case Else
.Visible = True
End Select
End With
Next

End Sub


"Bert" wrote in message
om...
I have a flowchart built out of a number of shapes in my Excel
worksheet. I want to write a macro to hide a number of objects based
on a shape property. For example, I want to hide all objects with a
certain transparency, or a certain color.

I am making a presenation and I want to hide portions of it at the
click of a mouse.

Any suggestions?

Thanks