Freeze Excel Spreadsheet till template open first then spreadsheet

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi,

When I export the data from Access 2002 to excel spreadsheet after
select excel templates. I couldn't open the spreadsheet until i open
the template and then closed the template. I open the spreadsheet
where i get the data from Access 2002. It works.

Here is the area that I have trouble with.


'Hide warnings on the spreadsheet
ExcellApplication.DisplayAlerts = False
'Save the workbook
ExcellApplication.ActiveWorkbook.Save
'Turn spreadsheet warnings back on

ExcellApplication.DisplayAlerts = True

'Make it visible
ExcellApplication.Visible = True
ExcellApplication.Visible = False

Your help would be much appreciated.
Thanks
 
Hi,

I'm not sure what you mean by template since your code doesn't show any
lines to that effect. The usual code for exporting data to Excel would be:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
"Employees","C:\Excel\Newemps.xls", True, "A1:G12"

However, you would probably get better results by posting to the Access
Newsgroup here at the Microsoft site.

If this helps, please click the Yes button.
 
Back
Top