Export to Excel Command button

B

Bill

Hello,

I have two questions.

1) I'm able to export the data to Excel Spreadsheet. After I close Excel
spreadsheet then I notice that my form look grey screen. (second screen
where I select the criteria before export to Excel). I just hit by
accident "Alt F4" and it went back to the first screen. Is there a way to
go back to second screen instead of first screen as switchboard.

2) When I export the data to Excel spreadsheet, the file created in my C
drive

If Dir("C:\Test5.xls") <> "" Then Kill "C:\Test5.xls"
DoCmd.TransferSpreadsheet acExport, 8, "GTS Data Output", "C:\test5",
True, ""
RetVal = Shell("C:\Program Files\Microsoft Office\Office\excel.exe
C:\test5.xls", 1)

Is there a way to default into "My document" instead of C:\test.xls

YOur help would be much appreciated.
Thanks
 

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