I am trying to create some VBA code that will allow me to open up a new instance of processbook. Once the new instance is opened, assign it to a variable that will allow me to open up pdi files within that particular instance.
Currently I am using the Shell command to open up a new instance of processbook, however, I am unable to programmatically open and close displays within the new instance.
Any and all help is appreciated.
Public vPID As Variant Public Sub OpenApplication() 'Launch application if not already open If vPID = 0 Then 'Application not already open 101: vPID = Shell("C:\Program Files (x86)\PIPC\Procbook\Procbook.exe", vbNormalFocus) Else 'Application already open so reactivate On Error GoTo 101 AppActivate (vPID) 'This currently does not work. The above does thought. With Application.ActiveProcBook .Application.Displays.Add "test" End With End If End Sub
It would tremendously help others help you if you would share your VBA code.
I have updated my original post.