AnsweredAssumed Answered


Question asked by VRFuser on Mar 29, 1999
Latest reply on Mar 29, 1999 by VRFuser

You should refer to the Advanced Programming manual, page 177 and read about
Default Properties.  The keyword SET prevents the right-hand-side of an
expression from automatically getting its Default Property.  What you're
seeing on the right thread is that the CreateObject() happens and returns
the Excel Application, then since it's not assigned to anything using SET,
the result of the expression has a Default Property Get happen to it.  The
default property of an Excel Application happens to be its Text name, so you
get the Text string "Microsoft Excel". 

99.99% of the time the desired behavior is to automatically have the Default
Property Get happen, the CreateObject() example you have is the 0.01% where
you want to use SET to defeat that.

This is the "standard" behavior of ActiveX Automation, Visual Basic etc
works the same way.

Sue Wolber

-----Original Message-----
From: B. Aufenanger []
Sent: Friday, March 26, 1999 2:29 AM
To: VEE Usergroup (E-Mail)
Subject: vrf: CreateObject

Dear VEE users,

I offered a HP VEE- workshop this week and one of the participants tried to
use the CreateObject-Object directly from the Object browser. I was not able
to explain him what's the difference between the two threads in my example
program. Can anyone help me?

Best regards
B. Aufenanger
Somatec B. Aufenanger & M. Bernhardt
Jagdweg 7a
D-82041 Deisenhofen

Telefon          : (089) 613 984 91
Fax.               : (089) 613 981 23
Email             :
homepage     :