• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code to replace the file with same name in same directory .. EXCEL alert

HI team,


I have written an macro where the code serve's to open file from folder saved on desktop and editing the same and i want to save as the same file in the same folder . but while doing the same excel is asking if i want to replace the existing file with the file changed in same folder.


i need a code to skip that alert & excel should accept the and replace the existing file with new file.


appreciate you quick response.


Thanks

Raghava
 
Example code:

[pre]
Code:
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
[/pre]
 
Thanks Luke, but this isn't working ... as my file when it is first time opened for some update's it is in TEXT(TAB DELIMITED)(*TXT) format & File is in "ABC.XLS".


So when i am saving after update i need to do save as and select the format as (*XLS) and replace the file which is already existing.


Do we have a code for this type of scenario.


Thanks

Raghava
 
I was assuming that you already had the code to save the workbook. The info I was providing was how to turn off the alerts.
 
Back
Top