Hello all
I open a template Excel file as following
-----------------------------
im xlApp As Object
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlBook = xlApp.Workbooks.Open("C:\Database\TempExcel\invoic e.xls")
xlSheet = xlBook.Worksheets(1)
---------------
Then I save this file as with a new name
Dim fileName As String = "C:\aNewFile.xls"
xlBook.SaveAs(fileName)
-------------
However, if there is existed file "aNewFile.xls", there is a message
informing that there is a file with the same name and ask me if I want to
replace it. I do not want to have this message and want my application
automatically replaces the old file. Coul you please tell me how to do that.
Thank you very much for your help
S.Hoa