I searched with no results and finally decided to post:
My Excel application runs with DDE links that update in real-time. Some of my cells have conditional formattings, that execute a UDF when a condition is TRUE. My UDF resides in VBA and calls a function in VB6 DLL library.
Everything works great, however sometimes I experience the following errors:
All of the sudden for no apparent reason or particular condition I get:
Run-time error '50290'
Method '~' of object '~' failed
[OK]
This is strange because my VB6 DLL function, (which is called by UDF inside VBA), has an error trap and this message should never be displayed.
So right now, my guess is somehow the link between Excel and DLL is being lost. But why and what can cause it?
Right after I click OK, next message is displayed that reads:
Run-time error '-2147418105' (80010007)
Automation error
The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.
[grayed out Continue] [End] [Debug] [Help]
If I click on Debug, it takes me to my UDF function in VBA and debugger highlights the line which makes the call to a function in VB6 DLL library.
By trying to execute it again, message #2 appears over and over again. My only options are to end execution and close Excel.
If I keep the same session of Excel opened, it's no longer possible to 'attach' or associate my DLL with this session of Excel. So my only resort is to save the workbook and close it. After re-opening the workbook everything works fine.. until this error (#1) happens again.
I will be extremely thankful for any ideas or insights on this issue and any suggestions on what could be done to overcome this error from happening or trap the source.
Thank you,
Alex
My Excel application runs with DDE links that update in real-time. Some of my cells have conditional formattings, that execute a UDF when a condition is TRUE. My UDF resides in VBA and calls a function in VB6 DLL library.
Everything works great, however sometimes I experience the following errors:
All of the sudden for no apparent reason or particular condition I get:
Run-time error '50290'
Method '~' of object '~' failed
[OK]
So right now, my guess is somehow the link between Excel and DLL is being lost. But why and what can cause it?
Right after I click OK, next message is displayed that reads:
Run-time error '-2147418105' (80010007)
Automation error
The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.
[grayed out Continue] [End] [Debug] [Help]
If I click on Debug, it takes me to my UDF function in VBA and debugger highlights the line which makes the call to a function in VB6 DLL library.
By trying to execute it again, message #2 appears over and over again. My only options are to end execution and close Excel.
If I keep the same session of Excel opened, it's no longer possible to 'attach' or associate my DLL with this session of Excel. So my only resort is to save the workbook and close it. After re-opening the workbook everything works fine.. until this error (#1) happens again.
I will be extremely thankful for any ideas or insights on this issue and any suggestions on what could be done to overcome this error from happening or trap the source.
Thank you,
Alex