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 and Close Pop Up Box...After Save and Close In VBA

Hi Peeps........Can you help?

I have recorded a simple macro in the "Before Close" section of th
sheet, to save all work before the sheet closes,

However I have also created a active control button in one of th
sheets to save the workbook and then close it.

I need to keep both codes as they operate at separate times,

When I click the save and close button, it does all that I wan
including Saving the file, after saving it then closes the work book
but before this a pop up message asks me that a file allready exist
with the same name, do I want to overwite?

Is there any way I can stop this from poping up

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save and Close Pop Up Box...After Save and Close In VBA

Use save instead of saveas.

--
Regards,
Tom Ogilvy

"Celtic_Avenger " wrote in
message ...
Hi Peeps........Can you help?

I have recorded a simple macro in the "Before Close" section of the
sheet, to save all work before the sheet closes,

However I have also created a active control button in one of the
sheets to save the workbook and then close it.

I need to keep both codes as they operate at separate times,

When I click the save and close button, it does all that I want
including Saving the file, after saving it then closes the work book,
but before this a pop up message asks me that a file allready exists
with the same name, do I want to overwite?

Is there any way I can stop this from poping up?


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save and Close Pop Up Box...After Save and Close In VBA

thanks......Tried that, but I think it is trying to resave when i
reached the

ActiveWindow.Close

part of the code.

anyway to stop the "A file with that name allready exists...." pop u
box?

Thanks

Celtic_Avenge

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save and Close Pop Up Box...After Save and Close In VBA

the only time you get this is if you use saveas rather than save. If you
save a file, Excel doesn't raise this message. You note that save does not
take a filename while saveas does. Whether it saves twice or 20 times, you
don't get the prompt with Save. Perhaps you think you are using save - but
if you check your code I suspect you will find you are using saveas in at
least one of the routines that are being fired.

--
Regards,
Tom Ogilvy



"Celtic_Avenger " wrote in
message ...
thanks......Tried that, but I think it is trying to resave when it
reached the

ActiveWindow.Close

part of the code.

anyway to stop the "A file with that name allready exists...." pop up
box?

Thanks

Celtic_Avenger


---
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
Vba - Save but don't close Sandy Excel Worksheet Functions 4 April 4th 23 10:38 AM
save and close Mad Man Excel Discussion (Misc queries) 2 April 2nd 09 01:25 PM
To save and close Steved Excel Worksheet Functions 5 July 27th 05 12:17 AM
Close without save Jesse[_5_] Excel Programming 3 May 7th 04 12:03 AM
Save as .txt then close Ryan Excel Programming 1 April 16th 04 08:16 AM


All times are GMT +1. The time now is 02:12 AM.

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"