Document_BeforeClose event...

R

RJ Lohan

Hi,

I'm having a problem with the App_DocumentBeforeClose event in a VBA
event handler class I have created.

The specific problem occurs when I access the Doc parameter (which is
automatically passed to this event) when this event fires for linked
documents. (in this case a linked document can be created by dragging
one doc into another).

It seems like this event is raised at least one more time than it should
be, and on that time, the Doc parameter is actually Nothing (which is a
bit daft, if you ask me, but there you go... :p )
And in this case, a runtime error 5825 'Object has been deleted' is thrown.


Can anyone confirm this? It's an easy enough problem to work around, but
I'm basing my 'fix' on guesses, so I'm not 100% confident I've pegged
the problem correctly...


Cheers,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top