"Action" Problem(s)


    Sponsored Links


  • 1. how to convert to metric system in visio 2003?
    how to convert to metric system in visio 2003?
  • 2. lock down a picture when adding callouts
    I want to place callouts on top of a picture, and I want the picture "locked down" so it cannot be selected or moved as I add callouts. What's the best practice to accomplish this?
  • 3. allow text block resizing
    I cannot change a text block's width since adding words to it. It will grow taller, but not wider when words are added. Any ideas on where to look for the cause and how to fix this would be appreciated.
  • 4. Callout connector won't attach?
    Using Visio 2007. I'm trying to attach a callout to a dataflow "data store" box. I've used the connector tool and now have a little blue x on the box and I can drag the callout connector over and I get a red square, presumably indicating that the attachment has been made. In fact if I mofe the "data store" box the attachment remains intact; however if I move the callout box then the connector disconnects and just follows the callout box. This seems like pretty unhelpful behavior. What am I doing wrong? Bill
  • 5. Is there a way to date/time stamp updates on pages?
    I want to keep track of when I've made changes on each page, not just the entire document? How can I automatically do this?

"Action" Problem(s)

Postby Joe Cletcher » Thu, 21 Aug 2003 19:42:16 GMT

I'm just trying to add a right-click option for a shape 
that passes the "ShapeKey" property of the shape that 
was "right-clicked" to and then executes a macro I have 
written. It's not working. Anyone see what I'm doing 

The macro and the "Action" lines are shown below. Only 
the 1st action line (DOCMD(1312)) works. The macro just 
shows a form with the faked "ShapeKey" and a single 
command button.

Public Sub ShowCustomData()
    Dim aForm As New frmMsnAsrncIssues
    Dim ShapeKey As Long
    ShapeKey = 35
    aForm.rtbShapeID.Text = "Shape ID: " & CStr(ShapeKey)
End Sub

Private Sub cmdOK_Click()
End Sub

Action  1:
   Action: DOCMD(1312)
     Menu: "Properties..."
  Checked: 0
 Disabled: 0

Action  2:
   Action: RUNADDON("ShowCustomData")
     Menu: "Show Mission Assurance Issues"
  Checked: 0
 Disabled: 0

Re: "Action" Problem(s)

Postby Bill K. [MSFT] » Fri, 22 Aug 2003 08:19:51 GMT

Change the action to: RUNADDON("ThisDocument.ShowCommandData")

A second way to handle it is with the CallThis() shapesheet function.
It will pass a reference to the shape, which is handy for looking up
properties from the shape.

action: CALLTHIS("ThisDocument.ShowCommandData")

vba macro:
Public Sub ShowCommandData(visShape as Visio.Shape)
    Dim ShapeKey as String
    ShapeKey = visShape.Cells("Prop.MyKey").ResultStr(0)
End Sub

Hope this helps,

This posting is provided "AS IS" with no warranties, and confers no rights.

Re: "Action" Problem(s)

Postby Joe Cletcher » Wed, 27 Aug 2003 02:36:15 GMT

Thanks! Would have gotten back to you sooner, but my 
group's offices were moved to new digs and computers were 
down until today about noon.

Tried "CallThis" and
"RUNADDON" with the following argument 
("ThisDocument.ShowCustomData"). Neither syntax executed 
the macro "ShowCustomData". When I entered the command 
via the EDIT/ACTION menu choice VISIO entered
RUNADDON("JIMO.Module1.ShowCustomData") as the action 
item--that did not work either.

Still cannot get my user-defined macro to execute as 
an "action" method of a VISIO shape.

If I can get that to work, then I'll worry about 
including the VISIO.SHAPE as an argument to my 
macro "ShowCustomData".

I've used a break point at the first executable statement 
in the macro and it never reaches the break point when 
attempting to execute the macro from the action right-
click menu choice--macro works fine when requested from 
the TOOLS/MACROS/JIMO/Module1/ShowCommandData menu item.

Still at a loss--any other thoughts?

shapesheet function.
for looking up
confers no rights.


Re: "Action" Problem(s)

Postby Joe Cletcher » Thu, 28 Aug 2003 19:15:24 GMT

hanks! Enough of a clue to get the call to the macro to
work. I originally had the module and the form under a
user-defined stencil. When I created the module and the
form in the flow diagram, everything worked.

If you use the "CALLTHIS" function instead of
the "RUNADDON" function in the action statement of the
shapesheet, the VISIO shape object is provided as an
argument value for the macro I defined. Then I can use
the VISIO.Shape.ID property to get a unique identifier
for the shape--hope it is the same as the "shapekey" when
linking to a database. I'll have to check out
the "shapekey" and VISIO.Shape.ID relation.

Again, THANKS!
the "ThisDocument"-module!
Array Shapes.
module in the document
must preface the
document project that
group's offices were
about noon.
When I entered the
item--that did not
an "action" method
including the
macro "ShowCustomData".
statement in the macro
to execute the macro
from the

Similar Threads:

1.Shapes menu, Actions missing

Using Industrial Control Systems diagram and shapes. Having problems with 
changing a Relay contact to show closed contact or show open contact in an 
existing document.  The shapes menu is missing Actions.  If I create a new 
diagram, I have this option.  For some reason we have several existing 
diagrams that this option is unavailable.  We were able to do this the last 
time they were updated about a year ago.  Is there someway to make Actions 
available on the Shapes menu.   I've tried to add it, but it doesn't show up. 
 Any suggestions would be appreciated.

2.'Word is waiting for another application to complete an OLE action'

This happens when attempting to copy a visio file to 
word, wheter link, embedded or picture.
Then is brings up Task Msnager.
What is is trying to tell me?

3.Visio internal error: # 2131: Action 1002: open

The following message displays:

Visio internal error: # 2131: Action 1002: open 
First try closing and reopening the file.  Next try restarting Visio.

This message displays when I try to open a file created on someone else's 
computer that has the same version of Visio.  

The suggested action makes no difference.

I have since tried it on a couple of other people's laptops and they 
encounter the same error message.  

Yet I can open it OK on the laptop where the file was created.

Anyone have any insights for me please?

4.modeling action queries


I am reverse engineering a database I wrote in access for documentatio
purposes.  Visio does not import my action queries.  Do I have to writ
the appends and make tables in SQL and then enter a new object as 

Here is an example of the SQL for one such append query:

INSERT INTO CFO ( [Desc], [Budget Code], [Expend Code], [Spent De
2004], [Allocated Dec 2004], [Spent Jun 2005], [Allocated Jun 2005]
[Spent Sep 2005], [Allocated Sep 2005], [Spent Oct 2005], [Allocate
Oct 2005], [Spent Jun 2006], [Allocated Jun 2006], [Unit Description]
[Department Description], [Requested Oct 2005], [Spent Dec 2005] )
SELECT tblExpend_codes.Disc AS [Desc], tblBudget_Main_Crosstab.[Budge
Code], tblBudget_Main_Crosstab.[Expend Code]
tblBudget_Main_Crosstab.[Dec-2004] AS [Spent Dec 2004]
[tblBudget_Main_Crosstab (allocated)].[Dec-2004] AS [Allocated De
2004], tblBudget_Main_Crosstab.[Jun-2005] AS [Spent Jun 2005]
[tblBudget_Main_Crosstab (allocated)].[Jun-2005] AS [Allocated Ju
2005], tblBudget_Main_Crosstab.[Sep-2005] AS [Spent Sep 2005]
[tblBudget_Main_Crosstab (allocated)].[Sep-2005] AS [Allocated Se
2005], tblBudget_Main_Crosstab.[Oct-2005] AS [Spent Oct 2005]
[tblBudget_Main_Crosstab (allocated)].[Oct-2005] AS [Allocated Oc
2005], tblBudget_Main_Crosstab.[Jun-2006] AS [Spent Jun 2006]
[tblBudget_Main_Crosstab (allocated)].[Jun-2006] AS [Allocated Ju
2006], tblCode_dept_link.[Unit Description]
tblCode_dept_link.[Department Description], [tblBudget_Main_Crossta
(Requested)].[Oct-2005] AS [Requested Oct 2005]
tblBudget_Main_Crosstab.[Dec-2005] AS [Spent Dec 2005]
FROM (tblCode_dept_link INNER JOIN (tblExpend_codes INNER JOI
(tblBudget_Main_Crosstab INNER JOIN [tblBudget_Main_Crossta
(allocated)] ON (tblBudget_Main_Crosstab.[Expend Code] 
[tblBudget_Main_Crosstab (allocated)].[Expend Code]) AN
(tblBudget_Main_Crosstab.[Budget Code] = [tblBudget_Main_Crossta
(allocated)].[Budget Code])) ON tblExpend_codes.Code 
tblBudget_Main_Crosstab.[Expend Code]) ON tblCode_dept_link.[Budge
Number] = tblBudget_Main_Crosstab.[Budget Code]) INNER JOI
[tblBudget_Main_Crosstab (Requested)] O
(tblBudget_Main_Crosstab.[Expend Code] = [tblBudget_Main_Crossta
(Requested)].[Expend Code]) AND (tblBudget_Main_Crosstab.[Budget Code
= [tblBudget_Main_Crosstab (Requested)].[Budget Code]);

In the event I have to write this stuff in manually, do I just copy m
SQL into the SQL box and then link the target table instance to th
"view" I create

5.Thanks Changing a User Defined Cell via an Action

Thanks that works

> See the SETF function.
> SETF(getref(user.row_1),3)
> SETF("User.Row_1",3)

6. Sea Vision launches unique maritime Action Packs

7. unbelievable explicit action down on the farmyard

8. Changing a User Defined Cell via an Action

Return to VISIO


Who is online

Users browsing this forum: No registered users and 62 guest