Chapter 21. Visio Automation and Microsoft Excel 2000 Interaction
IN THIS CHAPTER
Sending Data to Excel
Getting Data from Excel
Querying Excel for Visio's Use
Severing the Connection
As we saw with Visio earlier, there are three methods for contacting Excel from within Visio: GetObject(), CreateObject(), and New. The first of these presumes that Excel is already up and running. The second and third assume nothing and will launch a new copy of Excel, even if it is already running. Listing 21.1 is the syntax.
Listing 21.1. Accessing the Excel Application
Public Sub RunExcel1() Dim excelApp As Excel.Application Set excelApp = GetObject("Excel.Application") excelObj.Visable = True End Sub Public Sub RunExcel2() Dim excelApp As Excel.Application Set ... |
Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.