Exporting to an excel template file

S

SMT

I have a button in my database that export a query out to an excel template
and then opens up the file. See the code below. My problem is that when I
open up the excel template file using the followhyperlink it will open up the
xlt file and then give access to the user to modify this template file, which
is not what I want. I only want to use this template file as a shell in which
to import the data, I don t want the user to be able to save over this excel
template file. I hope I have explained this well enough.

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "qryGraphExportStep4Dept", _
"c:qryGraphExportStep4.xlt", , "qryGraphExportStep4"
Application.FollowHyperlink "c:qryGraphExportStep4.xlt"
 

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

Top