Creating, naming and browsing for location of save of new excel file

  • Thread starter Thread starter Rosson Cain
  • Start date Start date
R

Rosson Cain

I would like for the user to be able to browse for the
location to save the file that I have created in the code
below and to be able to name the file as well. I would
also like for the excel file to remain open after the
action is complete. any help would be appreciated, thanks.

Public Sub Export()
Dim MyXL As Object
DoCmd.SetWarnings False
Set MyXL = CreateObject("Excel.application")
DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel97, "IP_Results_1", MyXL, True
DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel97, "IP_Results_2", MyXL, True
DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel97, "IP_Results_3", MyXL, True
End Sub
 
I would like for the user to be able to browse for the
location to save the file that I have created in the code
below and to be able to name the file as well. I would
also like for the excel file to remain open after the
action is complete. any help would be appreciated, thanks.

Take a look at the solution provided on the following page at The Access Web:

API: Call the standard Windows File Open/Save dialog box
http://www.mvps.org/access/api/api0001.htm
 
Back
Top