Save and Close Pop Up Box...After Save and Close In VBA

C

Celtic_Avenger

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
 
C

Celtic_Avenger

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
 
T

Tom Ogilvy

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.
 
Top