Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outputting a report to Excel

Status
Not open for further replies.

rj51cxa

Technical User
Mar 16, 2006
216
GB
I have a command button which has the following code:
Code:
Dim oXL As Object, x
    stDocName = "RptSignatureSheet"

    Set oXL = CreateObject("Excel.Application")
    DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS, "c:\zzz\signaturedata.xls", True
Having created the workbook, I now need to do the following:

1 Save this workbook as "signaturedata.xls".
2 Open file "TrophySigSheet.xls" which has links to "signaturedata.xls".
3 Update the links and close "signaturedata.xls"
6 Save "TrophySigSheet.xls"
6 Return to Access, leaving Excel running with "TrophySigSheet.xls" open

I have tried various code combinations to achieve this but am getting nowhere.

I would be most grateful if someone could please advise the code I should use.

Desperate John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top