If You Havent Set It You Cant Use It

To assign an object reference to a local object variable, you must use the Set statement. The sole exception is the For Each...Next loop, which can iterate the object members of a collection. It generates an object reference automatically for each object that it iterates.

This method of creating an object reference produces a late bound interface; your application has no way of knowing in advance (that is, at design time) what the makeup of the object interface is. Only at runtime does your application get to bind to the interface; hence the term late binding. Because of this, you won't be given any help from VB's IntelliSense statement completion feature when writing your code; see the section "Reading the Object Model."

Was this article helpful?

0 0

Post a comment