mojo
09-02-2000, 08:05 AM
I am trying to copy a file (jobtracker.xls) and save it as temp.xls. However, if the file temp.xls already exists, the following message box is generated:
The File"temp.xls" already exists. Do you want to replace it?
YES NO CANCEL
I want it to copy over temp.xls if it already exists without the user having to answer "yes". Is there a way to do this automatically?
I am using the following code:
Dim XLJob As New Excel.Application
Dim XLtemp As New Excel.Application
XLJob.Workbooks.Open ("C:jobtrackerjobtracker.xls")
XLJob.ActiveWorkbook.SaveAs ("C:jobtracker emp.xls")
XLJob.Workbooks.Close
XLtemp.Workbooks.Open ("C:jobtracker emp.xls")
XLtemp.Application.Visible = True
Thanks for any help. Much appreciated....
The File"temp.xls" already exists. Do you want to replace it?
YES NO CANCEL
I want it to copy over temp.xls if it already exists without the user having to answer "yes". Is there a way to do this automatically?
I am using the following code:
Dim XLJob As New Excel.Application
Dim XLtemp As New Excel.Application
XLJob.Workbooks.Open ("C:jobtrackerjobtracker.xls")
XLJob.ActiveWorkbook.SaveAs ("C:jobtracker emp.xls")
XLJob.Workbooks.Close
XLtemp.Workbooks.Open ("C:jobtracker emp.xls")
XLtemp.Application.Visible = True
Thanks for any help. Much appreciated....