I have created a group where one of the shapes in the group is an embedded Excel workbook (Sheet.5 in my example below).
I would like the double-click behavior of the group to be opening up the spreadsheet for editing.
I have assigned a macro to the group double-click via the Format/Behaviour dialog.
My question is why does this always work:
----------
--------
But this only works if the group or a sub-shape in the group was selected just before I double-click:
--------------
-----------------
I would like the double-click behavior of the group to be opening up the spreadsheet for editing.
I have assigned a macro to the group double-click via the Format/Behaviour dialog.
My question is why does this always work:
----------
Code:
Sub EditVolumeSheet()
Dim shpTheShape As Visio.Shape
Set shpTheShape = ActivePage.Shapes("Sheet.5")
ActiveWindow.Select shpTheShape, visSubSelect
On Error Resume Next
Application.DoCmd visCmdEditOpenObject
Application.DoCmd visCmdEditOpenObject
End Sub
But this only works if the group or a sub-shape in the group was selected just before I double-click:
--------------
Code:
Sub EditVolumeSheet()
Dim shpTheShape As Visio.Shape
Set shpTheShape = ActivePage.Shapes("Sheet.5")
ActiveWindow.Select shpTheShape, visSubSelect
Application.DoCmd visCmdEditOpenObject
End Sub