Exporting to excel.xls

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
 
G

Guest

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
 
G

Guest

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
 

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