News:

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

Strange issue with embedded excel sheet in a group

Started by grtyvr, May 06, 2014, 04:43:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

grtyvr

Visio 2007: Probably not a bug, but it is confusing me none the less....

Steps:
Create an embeded excel sheet using Insert/Object Mcrosoft Office Excel Binary Worksheet and check the "display as Icon" checkbox (Also, the behavior manifests with Macro-Enabled Worksheet.  I have not tried others.) For sake of example say that this object has the name of Sheet.1

Create a box with the Box tool
Group the Box and the spreadsheet object.
I would like to assign the double-click behaviour of this group to be opening up the spreadsheet for editing.  So in Format/Behavior I assign a macro in the double-click tab:

This works.....
Sub EditSheet()
    Dim shpTheShape As Visio.Shape
    Set shpTheShape = ActivePage.Shapes("Sheet.1")
    ActiveWindow.Select shpTheShape, visSubSelect
    On Error Resume Next
    Application.DoCmd visCmdEditOpenObject
    Application.DoCmd visCmdEditOpenObject
End Sub


But why does this only work if my spreadsheet subshape is already selected when I double-click the group?
Sub EditVolumeSheet()
    Dim shpTheShape As Visio.Shape
    Set shpTheShape = ActivePage.Shapes("Sheet.1")
    ActiveWindow.Select shpTheShape, visSubSelect
    Application.DoCmd visCmdEditOpenObject
End Sub


--
Guy

grtyvr

OK.  More wierdness, but probably explainable.....

Insert/Object Excel Spreadsheet display as an Icon

Set double-click to OLE Verb "Edit"

First double-click on the icon throws, "An error (1415) occured during the action Open Object.  Visio unable to edit the Binary Worksheet object.

But the next double-click on the icon works.
And the next double-click fails with the same error as above.
The next double-click works
etc.

Is that how it is supposed to go?

--
Guy

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: 150 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1051KB.
Tokens: post-login.
Cache hits: 13: 0.00155s for 26,739 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]