Exporting table to excel using VB

CravenStu

New member
Local time
Today, 23:04
Joined
Jun 12, 2003
Messages
6
Can anyone please help.

I am trying to create a form button that will allow a user to export a table to a new excel spreadsheet.
When the button is clicked I need the explorer window to open in the same directory the application is in, and alow the user to select a new name ,and if need, go to a different directory for the exported file.

Thanks
 
Take a look at the OutPutTo method of the Docmd object as a starting point. Getting the SaveAs dialog up will require the Common Dialog box to be used which is not good for distribution. Another alternative is to use an API call to show the Folder and File selection dialogs. If you need an example of the API dialog, shout up.
 

Users who are viewing this thread

Back
Top Bottom