Opening an Excel File without re-opening the App

S

Steve D

I know the basic premise of this question has been asked many times on this
board and I can have Access open Excel. MY question is this:

How can I have Access open an Excel file without starting a new Excel Window
for each file? Since I am using the full path for Excel and then the file it
is opening a new Excel window each time, so when I am done I have 5-10
different Excel windows open. Is there a way to avoid this?
 
T

tw

Isn't that handled within excel? If you open excel up (outside access) then
open a file, then use file open to open another excel file, you will have
multiple excel windows open.
 
G

George Nicholson

Try:
xlApp.ShowWindowsInTaskbar = False
Where xlApp is your Excel.Application object.

Not 100% this will do the trick via automation, but this is the option under
Excel's Tools>Options menu that controls whether single/multiple Excel
instances appear in the taskbar, so the chances are good...

(Rather than just turning it off and leaving it off, you might want to store
the user's current setting first, set it to False and then restore the
original setting when done).

HTH,
 
Top