Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reference a shapesheet cell

Status
Not open for further replies.

Twixman23

Technical User
Jun 1, 2004
10
US
I have been learning Visio little by little, and now I want to use VBA to reference what is in a particular cell in a ShapeSheet.

I have a Shape (Sheet.XX) and I put a RUNADDON("Database Refresh") in the Actions section of the ShapeSheet.

How do I reference the Actions section in VBA? I am trying to use CellsSRC but I haven't figured out the syntax.

I can reference cells, just not cellsSRC. Any info or pages where I can find the information in great detail is appreciated

Thanks!!
Twixman
 
Syntax:

objRet = Shape.CellsSRC (section, row, column)

Use the object browser to look up the constants to use for section (under VisSectionIndices), row (under VisRowIndices) and column (under VisCellIndices), as they are not intuitive at all!

Just tested this to get User properties:

With visApp.ActivePage
Debug.Print .Shapes("sheet.7").CellsSRC(visSectionUser, visRowUser, visUserValue)
End With

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Thank you very much! I figured it out after playing with it some. I don't know what I was doing wrong. It works though and that is that matters.

Twixman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top