Making an Object Variable Refer to an Existing Item

Started by sukishan, Sep 04, 2009, 04:58 PM

Previous topic - Next topic

sukishan

Making an Object Variable Refer to an Existing Item
Just as you can use the Set keyword to retrieve a reference to a new object, you can use it to retrieve a reference to an existing object. If objItem is an object variable that refers to an existing member of a class, you can use code like this to make objNewItem refer to the existing item:

Set objNewItem = objItemAfter this statement, objNewItem and objItem refer to the same object.
A good beginning makes a good ending