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
 

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