I am struggling with Excel GetObject finding the open instance of MicroStation running at the time of executing a macro. I have referenced my DLL using:
Declare Function mdlModelRef_loadReferenceModels Lib "stdmdlbltin.dll" (ByVal modelRef As Long, ByVal loadCache As Long, ByVal loadRasterRefs As Long, ByVal loadUndisplayedRefs As Long) As Long
However when I run:
Set myMSAppCon = GetObject(, "MicroStationDGN.ApplicationObjectConnector")
Set myMSApp = myMSAppCon.Application
Set mydgn = myMSApp.ActiveDesignFile
Set myModel = myMSApp.ActiveModelReference
I get an error 249: ActiveX component can't create object.
I am pretty inexperienced with MicroStation VBA so any help would be greatly appreciated.