Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save As Boxes and VBA

Thanks a lot, thats great - Have a good xmas.


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Title bar error in 'Save As' and 'Open' dialog boxes TheOldMan Setting up and Configuration of Excel 0 February 5th 09 12:04 AM
Data validation boxes, outputting a final number from the boxes MDH Excel Discussion (Misc queries) 1 November 16th 06 12:41 AM
Moving. Want to number boxes and inventory contents of boxes [email protected] Charts and Charting in Excel 1 August 29th 06 09:48 AM
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
How do i create a value for check boxes or option boxes Tim wr Excel Discussion (Misc queries) 1 February 9th 06 10:29 PM


All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"