Automating Excel from Word

J

JillE

Hi,

I've got a fairly complex macro that opens and populates an Excel
spreadsheet from Word. Once the user enters data, an error check is performed
from Word.

Everything is working well except that I want the execution of the error
check to be invisible to the user. Everything I've found indicates that
making the application invisible should do the trick but it doesn't seem to
work with my scenario.

I'm using the following code to reference the file:

With myXL 'myXL = Excel.application
..Workbooks(vFileName).Activate 'vFileName = name of file
....
end with

or

with myXL.workbooks(vFileName)
....
end with

Both variations result in the Excel application being displayed.

I added 'myXL.visible=false' and Excel disappears for an instant and then
reappeared to execute the code. The code checks content of cells using
..activecell.value etc.

Any suggestions would be very much appreciated!
 

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