A
annysjunkmail
I have 2 questions with TransferSpreadsheet.
1. How do I open and select a sheet on the spreadsheet that I have
just exported? After gleaming the Newsgroups I have got this far but
can't work out to select a sheet...
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "MyQuery",
"d:\Temp\MySpreadsheet.xls", , True
Dim xlObj As Object
Set xlObj = CreateObject("excel.application")
'open the template file
xlObj.Workbooks.Open "d:\Temp\MySpreadsheet.xls"'Start Excel and show
xlObj.Visible = True
2. In conjunction with the Transferspreasheet command is it possible
to allow the user to select the location to save the exported
spreadsheet instead of inserting the default path of
"d:\Temp\MySpreadsheet.xls"? The reason that I ask is because the
database is stored on a server, which is used by other staff, and it is
possible that my spreadsheet could easily be overwritten with another
users' spreadsheet.
Many thanks
Tony
1. How do I open and select a sheet on the spreadsheet that I have
just exported? After gleaming the Newsgroups I have got this far but
can't work out to select a sheet...
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "MyQuery",
"d:\Temp\MySpreadsheet.xls", , True
Dim xlObj As Object
Set xlObj = CreateObject("excel.application")
'open the template file
xlObj.Workbooks.Open "d:\Temp\MySpreadsheet.xls"'Start Excel and show
xlObj.Visible = True
2. In conjunction with the Transferspreasheet command is it possible
to allow the user to select the location to save the exported
spreadsheet instead of inserting the default path of
"d:\Temp\MySpreadsheet.xls"? The reason that I ask is because the
database is stored on a server, which is used by other staff, and it is
possible that my spreadsheet could easily be overwritten with another
users' spreadsheet.
Many thanks
Tony