Ghost window in Excel 2016 after transfer spreadsheet action

Dystonia

Access 2002, 2010, 2016
Local time
Today, 07:33
Joined
Nov 11, 2017
Messages
22
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.

attachment.php


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: 1,020
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.
 
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:
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

Back
Top Bottom