Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working on an application in VBA that will read in yesterday's file,
save it as filename_OLD.xls, then replace the data in it with today's data and save it as filename.xls. How do I replace the existing filename_OLD.xls without having any messages or prompts appear? The VBA help tells me everything except what I want to know. I've tried .SaveAs and doing a ..DeleteFile before saving the new version, but I've had problems with both. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim
If you want to overwrite the file then you can use Application.DisplayAlerts = False 'SaveAs code Application.DisplayAlerts = True -- Regards Ron de Bruin http://www.rondebruin.nl "Jim Skrydlak" wrote in message ... I am working on an application in VBA that will read in yesterday's file, save it as filename_OLD.xls, then replace the data in it with today's data and save it as filename.xls. How do I replace the existing filename_OLD.xls without having any messages or prompts appear? The VBA help tells me everything except what I want to know. I've tried .SaveAs and doing a .DeleteFile before saving the new version, but I've had problems with both. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you. Turns out that I was also trying to write to a directory to which
I had only read-access. Makes things difficult :-) Jim "Ron de Bruin" wrote: Hi Jim If you want to overwrite the file then you can use Application.DisplayAlerts = False 'SaveAs code Application.DisplayAlerts = True -- Regards Ron de Bruin http://www.rondebruin.nl "Jim Skrydlak" wrote in message ... I am working on an application in VBA that will read in yesterday's file, save it as filename_OLD.xls, then replace the data in it with today's data and save it as filename.xls. How do I replace the existing filename_OLD.xls without having any messages or prompts appear? The VBA help tells me everything except what I want to know. I've tried .SaveAs and doing a .DeleteFile before saving the new version, but I've had problems with both. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace Existing File | Excel Programming | |||
SaveAs macro: How do I specify "Replace existing file?" | Excel Programming | |||
Do you want to replace existing file? | Excel Programming | |||
the file already exists - do you want to replace the existing file? | Excel Programming | |||
Automatically replace existing file on save | Excel Programming |