Excel-> Visio

C

Chris Roth [Visio MVP]

Hi Suomi,

Try the "ExecuteLine" statement.

In the following code:

- Visio diagram is called: "Visio VBA Test.vsd"
- Test-sub is called: "ThisDocument.VisioTest"

-----------------------------
Sub CallVisiomacro()

' Add a reference to: Microsoft Visio 12.0 Type Library

Dim visApp As Visio.Application
Set visApp = New Visio.Application

Dim visDoc As Visio.Document
Set visDoc = visApp.Documents.Open(ThisWorkbook.Path & "\Visio VBA
Test.vsd")

visDoc.ExecuteLine ("ThisDocument.VisioTest")

End Sub
-----------------------------


--
Hope this helps,

Chris Roth
Visio MVP


Visio Guy: Smart Graphics for Visual People

Articles: http://www.visguy.com
Shapes: http://www.visguy.com/shapes
Dev: http://www.visguy.com/category/development/
Forum: http://www.viguy.com/vgforum
 

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