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