View Single Post
  #5  
Old January 24th 08, 02:20 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 94
Default How to overwrite a file automaticaly

I tryed the two method above, but It doesn't change anything , I still have
a message asking me If I want to Overwrite the existing file.

Application.DisplayAlerts = False
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"
Application.DisplayAlerts = True

and

Kill "\\Backup\mybackup.xls"
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"




"JP" a écrit dans le message de news:
...
Can you be more specific?

Did you step through the code? If so, what line caused the error? And
what was the error message?

What version of Outlook are you using, and where exactly are you using
the code (class module, userform, outlook form, etc)?


Thx,
JP


On Jan 24, 2:37 am, "bbnimda" wrote:
No it doesn't work

"JP" a écrit dans le message de news:
...
Application.DisplayAlerts = False
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"
Application.DisplayAlerts = True

or

Kill "\\Backup\mybackup.xls"
objExcelApp.ActiveWorkbook.SaveAs "\\Backup\mybackup.xls"

HTH,
JP



Ads