Coding issue?

Started by wapperdude, September 11, 2019, 10:43:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

Simple macro.  Select main shape.  Macro converts main to a group.  Sets visibility. Finds shape on top using spatial neighbors.  Adds new shape to group.  Then edits new shape to lock its position and size within the group.  Position offset is hard coded.  All works well if I just run the macro.  But, if I step thru it using F8, then after the add to group step, the shape alignment window launches.  Say what???

So, does this happen for anyone else?  Only happens when using F8.
Visio 2019 Pro

Croc

This is because in step-by-step mode after the AddToGroup operation the focus is transferred to the Drawing Window. F8 is executed for the selected group in this window.
To check, manually make any group and execute F8.

wapperdude

Thanks Croc.  Didn't suspect that.  Nice to know it's not me.

Well, that's inconvenient.  At least, it seems, before execution of next step, the group can be manually deselected.

Does seem odd though.  It appears that it's either the addtogroup or creategroup methods that create this problem.  Selecting an existing group is fine.  So, I would consider this a BUG.
Visio 2019 Pro