ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Controlling Visio from within Excel (https://www.excelbanter.com/excel-programming/380869-re-controlling-visio-within-excel.html)

NickHK

Controlling Visio from within Excel
 
Steve,
I don't use Visio, but assuming it functions similarly to Office apps, then
try :

Set a reference to the Visio type library, under ToolsReferences find and
select the Visio entry.
Dim WithEvents VisioApp As Visio.Application 'Change the correct syntax

Check the Help for WithEvents; it means you will receive an event in Excel
when something happens in Visio, in your case the document (?) closing. This
can trigger your code to copy/paste etc.
Note that using "WithEvents" you must use early binding and the varraible
must be declared in a class module (although a worksheet module is actually
a class module).

Viso and VBA;
http://visio.mvps.org/VBA.htm
There is a list of Visio newsgroups in the above link, that would be better
to help with the Visio end than this NG.

This may be useful, although its meaning of "automation" is not the same as
Office/OLE;
http://www.boxesandarrows.com/view/a...ams_with_visio

Make a start and see what you can achieve. post back if you have
difficulties.

NickHK

"Steve" wrote in message
...
I apologise if this seems a little basic, but I'm not sure where to start.

When running a XL file, on the click of a button I want to launch a

template
in visio. When the visio file is closed, I want to automatically copy the
visio workspace and paste it into the worksheet.

Any help to get me started would be appreciated.





All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com