[Solved] Auto ungroup shapes on drop

Started by thegreatgibsoni, January 08, 2016, 10:07:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thegreatgibsoni

This topic is directly related to a topic from 2008: http://visguy.com/vgforum/index.php?topic=26.msg60#msg60

Basically, I'm using a macro to ungroup a Shape upon drop AND ignore the error message per the instructions in the link above. I also updated how the macro is called (per the thread) to use "CALLTHIS("ThisDocument.UngroupThis")" on the ShapeSheet for the Shape.

However, I drag the shape onto the document but the shape remains grouped. I'm not sure what I'm doing wrong and I need more assistance.

I'm definitely a novice here, and any help will be greatly appreciated. I'm at my wit's end after looking into this issue for 7 hours!

Yacine

Hi,
You need to set up the CallThis routine properly.
- It needs to be in a MODULE of the stencil
- Instead of ThisDocument, try the actual name of the stencil.

Here's a link, where one was struggling with the function: http://visguy.com/vgforum/index.php?topic=4358.0
It actually was discussed plenty of times as you can see:
http://visguy.com/vgforum/index.php?topic=359.0
http://visguy.com/vgforum/index.php?topic=4125.0
http://visguy.com/vgforum/index.php?topic=2228.0
Yacine

thegreatgibsoni

I suppose that's where I'm confused. Again, a complete novice here. I have the module on my stencil and I'm referencing the stencil name in the EventDrop. Why is my shape still grouped on EventDrop?

I've attached a view of what I have done for the Module and ShapeSheet.

Yacine

You would start the debugging process, by checking if the routine is called.
Set a break point at the first instruction step (Application.AlertResponse=1).  https://www.google.de/?gws_rd=ssl#newwindow=1&safe=off&q=vba+set+breakpoint

In one of the links I sent, there are different ways to call the routine. You may try them all. For my part I would have written CALLTHIS("UngroupThis","WireFrameComponents")
Yacine

thegreatgibsoni

YACINE!!! IT WORKED! THANK YOU!

Changing my EventDrop to "CALLTHIS("UngroupThis","WireFrameComponents")" did the trick!

I was so frustrated with this issue, I was going to give up. Thank you for not giving up on me!!

;D ;D ;D ;D ;D

-jg

Yacine

Yacine