User`s guide

256 VEE User’s Guide
6 Creating Reports Easily Using ActiveX Chapter
5 After you have compared the entries to Figure 150,
iconize the four objects.
Figure 150 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.