Visio Guy

Visio Discussions => Visio 2019 Issues => Topic started by: wapperdude on September 11, 2019, 10:43:17 PM

Title: Coding issue?
Post by: wapperdude on September 11, 2019, 10:43:17 PM
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.
Title: Re: Coding issue?
Post by: Croc on September 12, 2019, 08:29:42 AM
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.
Title: Re: Coding issue?
Post by: wapperdude on September 12, 2019, 03:01:57 PM
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.