BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

EventDblClick Macro does not open Groupshape Data

Started by SoWi030, July 09, 2015, 09:04:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hello together,

after Migration to Visio 2013 a double click event does not work as in the former Version.  Double clicking on any grouped shape it should open the data of the grouped shape by using the command Application.DoCmd (visCmdFormatCustPropEdit)
I have been looking and trying around for quite some time but have not found any solution. At least I have a clue, why the macro does not work anymore. I think it is because I am using a group of shapes. When double clicking on the group the macro should open the Shape Data of the group but does not. It opens only the shape data of one of the shapes in the group, which has no data. Therefore, I get the message "no shape data available. Do you want to define new Shape data?

The macro code called is – reduced to the minimum:

Sub ShowShapeData(shpObj As Shape)
Application.DoCmd (visCmdFormatCustPropEdit)
End Sub

I tryed to somehow identify the group the shpObj is belonging to but could not succeed (unvortunately not the shapeobject itself but only its name is provided):
Set GroupedShape = shpObj.ContainingShape
GroupedShape.application.DoCmd (visCmdFormatCustPropEdit)

Do you have any idea. I'm very sporadic Visio programmer and a self learning VBA programmer, so please talk basic and give examples. I really would appreciate it.


Ok - I am one step further. 

The Group Shape I could pick with the shpObj.Parent (see 3rd code line). But I'm still facing a problem when it comes to call the Shape-Data Dialog of it with command 'shpObj.Application.DoCmd (1312)'. Rest works fine. See coding section XXX:

Sub Test(shpObj As Shape)
    Dim subShp As Shape
    Debug.Print shpObj.ID
    Set shpObj = shpObj.Parent 'Set the Group - Shape
    If shpObj.CellExists("Prop.SubShape_0102", False) Then 'Check if a valid shape was chosen
        Debug.Print "strike", shpObj.ID
        Debug.Print shpObj.Cells("Prop." & "SubShape_0102").Formula
        Debug.Print shpObj.Cells("Prop." & C_ShpName_SubShape_0302).Formula

        'XXX: shpObj.Application.DoCmd 1312 does not open the parent shape that I put into the shpObj variable (see 3rd code line)
        'XXX: If I manually switch to visio and select the parent and than go on with F8 it works
        '      -> the command opens the parent shape data Dialog with all the cells attached.
'XXX How can I make the 'shpObj.Application.DoCmd (1312)' command open the right shape
        shpObj.Application.DoCmd (1312)
        'Update the Subshapes from the Cell-Info (works)
        F_WriteSubShapes shpObj, F_GetFieldString(shpObj, C_ShpName_HauptShape) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0101) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0102) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0103) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0201) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0202) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0203) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0204) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0205) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0206) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0207) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0301) _
                        , F_GetFieldString(shpObj, C_ShpName_SubShape_0302)

    End If
End Sub

Any idea? Thanks - It's 2a.m. I will check tomorrow.


Solved - without programming :o
That's were your nights go  ::)

Just when I did my last Research, I found the solution. In 2013 the double-click behavior is different. You can adjust it per Master-Shape:

  • Right-click on the Master Shape to edit the Master-Data Settings in a separate window.
  • Mark everything with Ctrl+A
  • On the Development Ribbon choose 'Behavior'
  • Change the behavior to 'only group'

Thanks anyways!

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 186 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1025KB.
Tokens: post-login.
Cache hits: 14: 0.00213s for 26,767 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]