Exporting to excel.xls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I want to export from a button on a form the filtered database to an Excel
sheet. Im trying to use the DataTransfer set Macro - but I cannot seem to
make it work. I want to pretty much replicate the "Export" funtion on the
File - Export function.

Cheers,
RickJ
 
Rick,

I have done that by first creating a Macro. and then on the "Click Event"
for my button included the following code:
Dim stDocName As String
stDocName = "M Output QBasicReportSubset to Excel"
DoCmd.RunMacro stDocName

"M Output QBasicReportSubset to Excel" is the what I named my macro.

I think if you follw the setup for the macro and then add this code tp your
button, it might work.

Good Luck
 
Thanks my friend I will give it a shot!!

TOMK said:
Rick,

I have done that by first creating a Macro. and then on the "Click Event"
for my button included the following code:
Dim stDocName As String
stDocName = "M Output QBasicReportSubset to Excel"
DoCmd.RunMacro stDocName

"M Output QBasicReportSubset to Excel" is the what I named my macro.

I think if you follw the setup for the macro and then add this code tp your
button, it might work.

Good Luck
 
Back
Top