AnsweredAssumed Answered

eventID 7 warning generated when working with events?

Question asked by renormalize on Jun 7, 2006
Latest reply on Jun 9, 2006 by renormalize
I 'm trying to write a simple sweep-counting routine in Excel VBA by following the outline of the COM events example in the Agilent N5230A PNA helpfile.  I've put the code into a UserForm and it all works fine until the time the form Unloads.  At that point, often (but not always!) the PNA issues the warning statement (ID 7):

The callee (server [not server application]) is not
available and disappeared; all connections are invalid. The
call may have executed.

After this, subsequent Shows of the form no longer trap events properly, and the program has to be restarted  from scratch to make it work properly again (at least until the next Unload is  invoked).  Is there some trick to unloading a form containing event-trapping code so as to avoid generating the above error?