RE: Ghostly presence of Excel process



PS:

The shell function will open the application (assuming it's in the same
folder on every user PC) but not the file. How do I implement that?

Thanks,

Bill R

"Barada Nikto"

Klatuu wrote:
Without testing all this, I can't be absolutely positive where the problem
lies; however, these are some things to consider.

First, this is not uncommon. The problem is caused by incomplete object
referencing to your Excel objects. When Access sees an Excel object
reference that is not fully qualified, it will create another instance of the
Excel process. When you issue the Quit statement, the instance of Excel you
created in destroyed, but the one that Access created can still be running.
I see one place that is suspect:

Cells.Select
Cells.EntireColumn.AutoFit

These two lines don't explicitly tie the cells to your instance.

That may be why blXLRunning = IsExcelRunning is always true.

Also, I notice that after you call your function StripXLFormats, you open
the workbook again but never Quit Excel.

If you did, then the spread*** would disappear. If you want the user to
see the spread*** after you have completed it, the better way is to save
it, close, quit Excel, then use the Shell function to open it.

The code below runs at the end of a sub that exports queries via a
transferspread*** routine to a new workbook which then has to be formatted,
[quoted text clipped - 124 lines]
Err.Clear
End Function

--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200603/1
.