Save As Boxes and VBA
Hello,
I am writing a small VBA projeact to download financial data. Basically the code will open a new workbook, paste in some data, and then close this workbook saving it as a text file. This process is then in a loop, which eventually will save 7000 files. The problem I am having is that when each of these files are closed after they are saved a pop up box comes up asking if I would like to save the file (although it is already saved). This is therefore causing difficulties as I am having to press yes or no each time, and this is defeating the point of the macro. I there a way or piece of code to stop these boxes from appearing. Many Thanks, and have a great Christmas James --- Message posted from http://www.ExcelForum.com/ |
Save As Boxes and VBA
Place application.displayalerts = false at the top of your
macro and set it back to true and the very bottom. That should solve it. -----Original Message----- Hello, I am writing a small VBA projeact to download financial data. Basically the code will open a new workbook, paste in some data, and then close this workbook saving it as a text file. This process is then in a loop, which eventually will save 7000 files. The problem I am having is that when each of these files are closed after they are saved a pop up box comes up asking if I would like to save the file (although it is already saved). This is therefore causing difficulties as I am having to press yes or no each time, and this is defeating the point of the macro. I there a way or piece of code to stop these boxes from appearing. Many Thanks, and have a great Christmas James --- Message posted from http://www.ExcelForum.com/ . |
Save As Boxes and VBA
|
Save As Boxes and VBA
Better would be to do
ActiveWorkbook.Close SaveChanges:=False -- Regards, Tom Ogilvy "James Rose" wrote in message ... Thanks a lot, thats great - Have a good xmas. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 11:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com