This code crashes on one but not all machines? Any ideas?

A

akh2103

Hello--the following code is attached to a userform that has been
distributed to many machines as an Excel add-in. It works on all
machines except for one. I indicate which line causes the crash below.
I have installed Service Pack 3 on the new machine, but the code is
still not running properly. Does anybody have any suggestions? Any help
would be appreciated.

Dim wdapp As Word.Application
Dim wddoc As Word.Document
Dim wdtable As Word.Table

Set wdapp = GetObject(, "Word.Application")
Set wddoc = wdapp.ActiveDocument
Set wdtable = ActiveDocument.Tables(1)

wddoc.Select
wdapp.Selection.find.ClearFormatting

With wdapp.Selection.find
.Text = FrmSeriesTables.TextBox1.Text <---CODE CRASHES AFTER THIS
LINE IS EXECUTED
 

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