User Selected Table to Export to Excel

AJordan

Registered User.
Local time
Today, 01:24
Joined
Mar 25, 2008
Messages
73
In my effort to make a very simple database that compiles monthly data (linked from several Excel Spreadsheet) and exports the data back into Microsoft Excel, im stumped on 1 thing.

My new plan requires the User to select from a combo box a list of the sites (or blank if All) and then a Date Range followed by an export button. Is it possible for the user to be able to select their own spreadsheet to export to? Here is my current code

Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryVSOCMaster", "C:\Users\Public\Desktop\HopeItWorks.xlsx", True
 
In your code set this section of your docmd as a variable
"C:\Users\Public\Desktop\HopeItWorks.xlsx",

Perhaps something like
Dim FilePath as String
FilePath = mycombobox

The combobox contains all the paths and file names you wish to use.
Then insert the variable in the docmd.
 

Users who are viewing this thread

Back
Top Bottom