256 Chapter 6
Creating Reports Easily Using ActiveX
Sending Agilent VEE Data to MS Excel
5. After you have compared the entries to Figure 6-5, iconize the four
objects.
Figure 6-5. The Globals UserFunction
Notice that by using the datatype Objects in the globals
UserFunction
, you could specify the Object Type and Class.
There are two reasons to specify
Object Type and Class: more
specific type checking, and catching events.
More Specific Type Checking: For example, if you specify an
Object
app
as being of type Excel.Application, then only an Object of
type
Excel.Application can be assigned to app. Assigning an
Object of type Excel.worksheet or Word.bookmark will cause an
error.
Catching Events: You could also use a VEE
UserFunction to catch
various events that could occur in the application, such as a
right-button-down in the MS Excel worksheet. For any of these types of
events, you can specify a VEE
UserFunction to handle the event and
pass information back to MS Excel.