visioshapesheet

How do I add an action to Visio (2003)?


In a Visio ShapeSheet, one can add actions. I want to create an action that updates the value of another cell (the position of a control). How can one do that? Does it need a separate macro, or can it be specified directly? And how?


Solution

  • You don't need an addon or macro; you can do this in the ShapeSheet.

    In the ShapeSheet, look for the Action section. If you don't find it right click and add it. In the Action section add a row. Set the cells to something like:

    Action = SETF(GetRef(Controls.Row_1),"2 in.")+SETF(GetRef(Controls.Row_1.Y),"2 in.")
    Menu = "Move Control"
    

    Change Row_1 to the name of your control row. You can also change "2 in." to a reference to a cell in which you calculate the new position.

    To learn more see:

    MSDN: Shortcut Menu Commands

    Bill Morein's: Meet A ShapeSheet Function: Setf