Sets a shared object variable to a handle to an OLE object. Shared objects retain their values across event boundaries. This is useful if you need to access the same object from two or more event handlers.
Normally you use this method in the event handler from the AppStart event where you create the remote OLE object, and then save it using . This is so that subsequent event handlers can access the same instance of the object without having to create the object each time it is required. The objects’ reference count is incremented by one.
Object.SetSharedObject (ObjectName, SharedObject)
|
Part |
Data type |
Description |
|
Object |
Object |
An object expression that evaluates to an object in the Applies To list. |
|
ObjectName |
String |
|
|
SharedObject |
Object |
|
None.