Run Visio Procedure from Excel

R

rhatcher

I need to have a macro in Excel open a Visio file and run a procedure.
I understand from one posting I found that I would use the ExceuteLine
method. However I cannot find that in the Excel VBA object browser, or
any reference material I have. Could some one point me in the right
direction or post an example of code that would get me started.

Thanks
robert
 
C

Chris [Visio MVP]

Execute a procedure that is stored in Visio's VBA project, or just open
Visio and "do something"?

In Excel, you can do something like this:

'// Start Visio:
dim visApp as Visio.Application
set visApp = CreateObject(,"visio.application")

'// Open a document:
dim visDoc as Visio.document
set visDoc = visApp.Documents.Open( "C:\stuff\junk.vsd" )

'// Do something in Visio
Debug.Print visDoc.Pages(1).Shapes(1).Cells("Prop.Cost").ResultIU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top