I am upgrading a program from V8i to CONNECT Update 15. The V8i code had an instance of the Application class declared as follows:
Private WithEvents msApp As Bentley.Interop.MicroStationDGN.Application = Nothing
And thencode to handle the OnDesignFileOpened event:
Public Sub DesignFileOpened(ByVal Filename As String) Handles msApp.OnDesignFileOpened
This works in v8i. In CONNECT I get the following error:
Error BC30590 Event 'OnDesignFileOpened' cannot be found.
Can someone tell me how to upgrade this or what I am doing wrong?
WarrenC said:Event 'OnDesignFileOpened' cannot be found
If you create a VBA macro, does that compile OK?
Dim WithEvents hooks As Application
Private Sub Class_Initialize()
Set hooks = Application
Private Sub hooks_OnDesignFileClosed(ByVal DesignFileName As String)
Debug.Print "Closed design file " & DesignFileName
Private Sub hooks_OnDesignFileOpened(ByVal DesignFileName As String)
Debug.Print "Opened design file " & DesignFileName
Regards, Jon Summers LA Solutions
I am not all that familiar with VBA. I will give it a try.