C
Caroline
I have a macro written in VBA in a Visio file.
I want to convert it to a standalone executable VB file.
Is it feasable?
Dim PathFileName As String
PathFileName = "C:\VisioFile.vsd"
Set VApp = CreateObject("Visio.Application")
Set VDoc = VApp.Documents.Open(PathFileName)
'how to test if previous statement executed flawlessly?
Set ActiveDocument = VDoc
MsgBox "Name: " & Name
MsgBox "ActiveDocument.Name: " & ActiveDocument.Name
So far so good
Dim Shap As Visio.Shape
-> Compile error: User-defined type not defined
For Each AShape In ActivePage.Shapes
MsgBox AShape.ID
Next AShape
1 - How can I declare Visio types in plain VB?
2 - How can I set the default 'container' to the Visio file,
and not the VB application?
Ie., I want Name to returns the Visio file's name,
and not the VB application's name.
Thank you
I want to convert it to a standalone executable VB file.
Is it feasable?
Dim PathFileName As String
PathFileName = "C:\VisioFile.vsd"
Set VApp = CreateObject("Visio.Application")
Set VDoc = VApp.Documents.Open(PathFileName)
'how to test if previous statement executed flawlessly?
Set ActiveDocument = VDoc
MsgBox "Name: " & Name
MsgBox "ActiveDocument.Name: " & ActiveDocument.Name
So far so good
Dim Shap As Visio.Shape
-> Compile error: User-defined type not defined
For Each AShape In ActivePage.Shapes
MsgBox AShape.ID
Next AShape
1 - How can I declare Visio types in plain VB?
2 - How can I set the default 'container' to the Visio file,
and not the VB application?
Ie., I want Name to returns the Visio file's name,
and not the VB application's name.
Thank you