SetSharedObject(Variable As String, COMObject As Object)

Application object

Sets a shared variable to a handle to an COM object. Shared objects retain their values across event boundaries. This is useful if you need to access the same object in two or more event handlers. The objects' reference count is incremented by one.

Related topics

SetSharedVariable

The Application object