Yep, remove that line.
You can replace;
oExcel.ActiveWorkbook.Close
with
oExcel.DisplayAlerts = False
oExcel.ActiveWorkbook.Close False
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"NHRunner" wrote:
| Other than one hiccup that works great. Thank you very much.
|
| The hiccup was that it crashed near the end with a VBS error "oSheet" not
| defined.
|
| I just defined osheet and the error went away, but could I just have
removed
| " set oSheet = Nothing"
| or is there some function that provides that isn't clear looking at the
| code.
|
| Also, was the "oExcel.ActiveWorkbook.Save" necessary if there is nothing
| changed in the workbook.
|
| regards
| Steve