Save As Method & Do you want to replace it? Prompt

matadora

New Member
Joined
Aug 28, 2002
Messages
1
I am trying to get around the excel message "this file already exists, do you want to replace it? in my macro. Is there a way to respond yes to the save as file prompt? If there is, what is the code?

Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

phantom1975

MrExcel MVP
Joined
Jun 3, 2002
Messages
3,962
WELCOME TO THE BOARD!

I'm not sure if this will take care of what you are looking for, but here are a couple of stabs.

Instead of doing a WorkBook.SaveAs do a WorkBook.Save so that you won't get the prompt.

Otherwise, if you need to use the WorkBook.SaveAs, then you can try adding a SendKeys "{ENTER}" command so that the enter key is pressed/sent after the SaveAs command.

Did this help?
 

Forum statistics

Threads
1,181,124
Messages
5,928,245
Members
436,594
Latest member
asifm0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top