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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,491
Messages
6,125,098
Members
449,205
Latest member
ralemanygarcia

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