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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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?
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,753
Members
449,094
Latest member
dsharae57

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