I recently converted an Access 2003 adp DB (that we ran in Access 2007) to a 2013 accdb DB. We have code that creates an Excel file in the background (i.e. not visible) for an eventual mailmerge. This worked fine in 2007, but in 2013 it opens the Excel window and shows all the processing steps it is taking to create the spreadsheet. We do not want the user to see this happening.
These two statementse are executed before creating the workbook:
oExcel.Visible = False
oExcel.DisplayAlerts = False
This works fine until it hits a CopyFromRecordset statement. At that time Excel displays and you can see the data filling in. Unfortunately, there is a bit of a delay after Excel is opened and the data is filled in. I am worried that the user will think something is wrong and close Excel or something.
Again in Access 2007, the 2003 adp VBA behaved as we wanted it to by keeping Excel hidden so the user did not see the file being created. I stepped through the code and determined it is the CopyFromRecordSet that is displaying Excel as the active window.
Any help is appreciated.
These two statementse are executed before creating the workbook:
oExcel.Visible = False
oExcel.DisplayAlerts = False
This works fine until it hits a CopyFromRecordset statement. At that time Excel displays and you can see the data filling in. Unfortunately, there is a bit of a delay after Excel is opened and the data is filled in. I am worried that the user will think something is wrong and close Excel or something.
Again in Access 2007, the 2003 adp VBA behaved as we wanted it to by keeping Excel hidden so the user did not see the file being created. I stepped through the code and determined it is the CopyFromRecordSet that is displaying Excel as the active window.
Any help is appreciated.