Set prop.****** Invisible=False for all shapes on a page with a ma

Set prop.****** Invisible=False for all shapes on a page with a ma

Post by RGF2aWQgUG » Thu, 13 Dec 2007 02:45:02


I am a complete idiot when it comes to VB but need to set the
prop.visDisplayDate Invisible =False for all shapes on my calendar.

There are 12 pages, and over 30 per page that need to have this attribute
changed. Is there a quick way to do this?
 
 
 

Set prop.****** Invisible=False for all shapes on a page with a ma

Post by John Golds » Fri, 14 Dec 2007 17:38:08

Hello David,

Have a look at this blog post on looping:

http://www.yqcomputer.com/

As you hit each shape you can check if it's the type of shape you want by
using the CellExists method and then set the specific cell:

'Loop
If shp.CellExists("Prop.visDisplayDate",0) = True Then
shp.CellsU("Prop.visDisplayDate.Invisible").Formula = 0
End If
'Keep looping

Bear in mind that the indidual date shapes may be part of a group shape so
you might need to check the Shapes property of the first shape object that
you hit. ie:

Dim shp as Shape
Dim shpSub as Shape
If shp.Shapes.Count >0 Then
For i = 1 to shp.Shapes.Count
Set shpSub = shp.Shapes(i)
If shpSub.CellExists........

Have a go a let us know how you get on.

Best regards

John


John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk