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

D

David Perry

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?
 
J

John Goldsmith

Hello David,

Have a look at this blog post on looping:

http://visualsignals.typepad.co.uk/vislog/2007/11/looping-through.html

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top