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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to Excell

Status
Not open for further replies.

romnew

Programmer
Feb 27, 2002
44
ZA
Hi everyone,
I have code (snippet below) which creates a excell sheet from an access recordset.
After the process it shows the sheet and a prompt to save changes
How can one prevent this happening.
With objSht
.Range(.Cells(1, 1), .Cells(conMAX_ROWS, _
intLastCol)).ClearContents
.Range(.Cells(1, 1), _
.Cells(1, rs.Fields.count)).Font.Bold = True
.Range("A1").CopyFromRecordset rs

End With

Thanks for helping
Piet
 
How can one prevent this happening
objSht.Parent.Save
objSht.Application.Quit

The above code save the workbook and close excel

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi Ph,
Thanks for your reply.
I will try it, and post the whole code once it works.
Most obliged
Piet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top