J
Jumper2
I'm trying to change the parent of an object depending on what it is
connected to.
I catch ConnectionAdded and ConnectionDeleted just fine.
When connecting a module to an object, I set the parent of the module.
This works also.
myObjModule.Parent = myObjSystemShape
When disconnecting the module, I want to set it back to having the page
as its parent.
myObjModule.Parent = myObjModule.ContainingPage.PageSheet
But this just generates an exception.
Why would it fail on the second one, but not the first?
Thanks,
-James
connected to.
I catch ConnectionAdded and ConnectionDeleted just fine.
When connecting a module to an object, I set the parent of the module.
This works also.
myObjModule.Parent = myObjSystemShape
When disconnecting the module, I want to set it back to having the page
as its parent.
myObjModule.Parent = myObjModule.ContainingPage.PageSheet
But this just generates an exception.
Why would it fail on the second one, but not the first?
Thanks,
-James