Re: Windows handle
Thank you for the quick answer. (a) Works relatively good. It is not the best solution, because the SuperEdi-Object does no more exist after closing and accessing the Visible-property throws an error. (b) Does not work, because I could not attach EventHandlers dynamically in VBA. (c) Would be the perfect solution. By using the Windows-API function "WaitForSingleObject" I can block my current thread until SuperEdi was closed. But now I can go on. Thanks again. P.S.: Here is the code for solution (a):
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Sub StartSuperEdi() Dim mySE As Object Set mySE = CreateObject("SuperEdi.Application") mySE.Visible = True On Error Resume Next Do Sleep 100 If Not mySE.Visible Then Exit Do End If Loop On Error GoTo 0 MsgBox "SuperEdi" End Sub
|