Chapter 6 251
Creating Reports Easily Using ActiveX
ActiveX Automation in Agilent VEE
When you put a check next to a Type Library in the ActiveX Automation
References box, the library objects become available for use in a VEE
program. For example, in Figure 6-1, Microsoft Excel 9.0 is checked.
Figure 6-1. The ActiveX Automation Reference Box
Creating and Using ActiveX Programs with Agilent
VEE
VEE includes a data type called Object for ActiveX programs. A VEE
object with the data type specified as
Object is a pointer to something or
some data held by the Automation Server. For example, an
Object could
point to a worksheet inside MS Excel, or to a cell inside that worksheet.
(Technically, an
Object is a pointer to an IDispatch interface returned by
MS Excel or the Server.)
For example, if you select
Data ⇒ Variable ⇒ Declare Variable,
set the Name to App, and set the data type as Object, you can use the
variable
App to point to an ActiveX Automation object such as the Excel
Automation Server. Figure 6-2 shows an example of a data type
Object.