Detect Master Property No Set

G

Gary

I have some shapes with the Master property set to something like Master.5

In some cases its not set. I was using an If statement and it gives errors
when there isn't any master property. How do I detect the fact this is set
or not before checking if the property has what I am looking for???


Thank You,

Gary
 
J

John

Hi Gary

You need to check whether the shape has a master and then if it does, check
the name:

If Not shp.Master Is Nothing Then
If shp.Master.Name = "YourName" Then

Hope that helps

Best regards

John
 
Top