Global o As Object
Global oregistered As Boolean
Public Function regQ() As Boolean
If oregistered = False Then
Set o = Application.COMAddIns.Item("myObjectiveOLAPXL.AddinModule").Object oregistered = True
Else
regQ = True
End If
End Function
Getting an object reference to myObjectiveOLAP from VBA
In all of the examples shown, you will see a preceding "o." in front of the myObjectiveOLAP function.
This is the object reference to the myObjectiveOLAP library. You must also generate an object reference either by using this example or creating your own.
To instantiate the myObjectiveOLAP from Microsoft Visual Basic for Applications or Microsoft Visual Basic you must bind myObjectiveOLAP to an object that you can then reference.
In all of the examples shown we do this check by calling the regQ function which is shown below.
The regQ function binds the myObjectiveOLAPXL.AddinModule to the Global object "o".
Once "o" has been bound you can use it to reference the myObjectiveOLAP functions i.e. o.connect o.mooAttached etc.
Microsoft®, WINDOWS®, Microsoft Excel®, Microsoft Office® are registered trademarks of Microsoft Corporation.
ORACLE® is a registered trademark of ORACLE Corporation.
® SDMC Consulting Limited 2010