Ghost window in Excel 2016 after transfer spreadsheet action (1 Viewer)

Dystonia

Access 2002, 2010, 2016
Local time
Today, 18:45
Joined
Nov 11, 2017
Messages
17
Hi

I am in the process of migrating users from Access 2010 to Access 2016

I know that Excel 2016 creates a separate instance of Excel for each individual workbook but after.....

Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "_Debug", ExportFileName
....when I make Excel and the output visible, there is always an empty "ghost" window which is allegedly part of the original export - check out the timestamp in the snip below.



The same thing happens whether it is a XLS or XLSX specification

Closing the "ghost" closes the "real" window

When I used the immediate window in Excel to ask how many windows are open.....
Code:
? activeworkbook.Windows.Count
 1 
? activeworkbook.Application.Windows.Count
 1
.....I am told there is only one window

Anyone know how to use VBA to get rid of the superfluous window to avoid user confusion as well as my own ?
 

Attachments

  • Capture.PNG
    Capture.PNG
    44.4 KB · Views: 955

Ranman256

Well-known member
Local time
Today, 13:45
Joined
Apr 9, 2015
Messages
4,337
Weird since I use 2016 and a TransferSpreadsheet will not create a ghost.

and to be sure, you are not calling Excel app anywhere prior to the TransferSpreadsheet call correct?

Note: I also have a pc that uses xL 2007 and it always leave an empty xl app once ALL workbooks are closed, but not during an open.
 

Dystonia

Access 2002, 2010, 2016
Local time
Today, 18:45
Joined
Nov 11, 2017
Messages
17
Hi Ranman 256, I agree this is weird

I used [Task Manager] to see what was running as I stepped through the code and there were no instances of Excel until the transfer spreadsheet command

Equally, when I manually tried to hide the "ghost" the "real" data became hidden leaving two empty windows visible.

When I unhid the "real" the "ghost" disappeared totally leaving just one window visible.

There must be an explanation, I will crawl through the default setting the IT department have used
 
Last edited:

Dystonia

Access 2002, 2010, 2016
Local time
Today, 18:45
Joined
Nov 11, 2017
Messages
17
Just returned from a 3 week vacation and tacked this issue afresh

This is more a "work around" rather than a solution

After the DoCmd.TransferSpreadsheet action, if the workbook is programmatically closed and then reopened, the ghost window disappears
 

Users who are viewing this thread

Top Bottom