Unusual error

G

Gem_man

I have a template that contains code that I have been working on.

Now when I try to open the template via a desktop shortcut the template
cannot be found, despite being at the correct location.

Going directly to the template and opening it, it opens OK.
Running the code causes Word to crash

Error:
Runtime error "-214741784 (80010108)':
Automation error
The object invoked has disconnected froms its client.

On clicking "debug" Word craches

Trying to access the VB editor in the template also crashed Word
Running an earlier version of the template results in the first userform
showing OK then Word crashes again.

I have done a detect and repair on Word and done a system restore to the
previous day prior to the problems.

Has anyone got any ideas what could be going on here?

I moved some code from a userform inialize to a module and made a couple of
alterations to the code (Screen update false and true statements) immediately
prior to the problems.

I am running Word 2000 on XP home without SP2

Any assistance would be appreciated as despite the fact that I made copies
of the template at crucial stages of the codes development, it now looks like
I might lose the lot.

Many thanks
Adrian
 
G

Gem_man

An update to the previous posting.

After much searching on the net, it seems that this error is more associated
with windows2000 and excel.

Most references to it related to SaveAs statements, Update statements and
Userform calling.

After numerous attempts to get in to the VB editor I eventually managed it
via the Tools>>Macros route but only just by luck (it had failed many
attempts before)

Once in, I deleted the last few lines that I added before the trouble. These
related to ScreenUpdate, Do Events and the calling of a modeless userform.

Once this was done, the code would actually start, where as before word
would just crash on any attempt to run it.

One curious thing....... all my public declared variables did not any values
in the tool tips thing when debugging but did hold a value at runtime.
Also the arrays were not getting recognised.

I deleted all public variable declarations, saved, reopened, repatsed the
variables and all seems to be OK now.

Adrian
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?R2VtX21hbg==?=,
Trying to access the VB editor in the template also crashed Word
Running an earlier version of the template results in the first userform
showing OK then Word crashes again.

I have done a detect and repair on Word and done a system restore to the
previous day prior to the problems.

Has anyone got any ideas what could be going on here?

I moved some code from a userform inialize to a module and made a couple of
alterations to the code (Screen update false and true statements) immediately
prior to the problems.
From the sound of it, the VBA section of the file may have become a bit
"scrambled". If you use File/Remove in the VB Editor on every module in the
project, choosing to export (save as pure text files) as you go, you can
probably remove the problem. Then you can use File/Import to bring it all back
in.

There's a "Code Cleaner" out there that automates this.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
G

Gem_man

Thanks Cindy. I had a couple of other problems crop up and sure enough
cleaning the code worked a treat!

Many thanks
Adrian
 

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