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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top