I'm simply trying to determine if the currently selected object (shape) is INSIDE a container.
After I verify shape is inside container I would like to set a variable to the container object to use later
Dim activeShp As Shape, containerShp As Shape
Set activeShp = Application.ActiveWindow.Selection(1)
Debug.Print activeShp.ContainingShape.ContainerProperties.ContainerType
That isn't working. ContainerType is supposed to return Nothing if it is not a container, 0 & 1 otherwise. I've been trying everything on the Shape MSDN with no luck. There has to be a fool proof way to test if a selected item is in a container right?
See this: https://msdn.microsoft.com/VBA/Visio-VBA/articles/shape-memberofcontainers-property-visio (https://msdn.microsoft.com/VBA/Visio-VBA/articles/shape-memberofcontainers-property-visio).
Wapperdude
Quote from: wapperdude on September 14, 2017, 02:51:24 PM
See this: https://msdn.microsoft.com/VBA/Visio-VBA/articles/shape-memberofcontainers-property-visio (https://msdn.microsoft.com/VBA/Visio-VBA/articles/shape-memberofcontainers-property-visio).
Wapperdude
Oops. Well thank you for taking the time to lead me here. This answers my question and got the results I needed!
Cool! I have V2007 so couldn't directly answer your question. Glad it was resolved.