Macro Help - Get rid of prompt when trying to save a file ov

Uli

New Member
Joined
Aug 27, 2002
Messages
2
I'm just new here but I'm in need of some help with a really simple Macro I'm just working on:

I am basically opening a file and then using Save As to save it with a different file name. That new file name already exists so I get the prompt that the file already exists and whether I want to overwrite the file. The answer in this Macro is always "Yes" to overwrite and I have to open about 100 worksheets. That's why I want to do this automatically and I don't feel like having to click on the prompt 100 times to keep the Macro running. I've got it all worked out except for how to get rid of that prompt in my code.

Any suggestions? Is it possible?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
uli
the 'display alerts property' topic in the vba help file suggests this as an example of how you'd do that:
Application.DisplayAlerts = False
Workbooks("BOOK1.XLS").Close
Application.DisplayAlerts = True
from reading the help file i think it applies to any alert in excel, but i know very little about vba - someone else will no doubt know.
hth
 
Upvote 0
Thank you very much. That works like a charm. I really appreciate the help. I feel a bit silly because I did look through all the help I could find but in my panic (major deadline looming) I didn't think to search for the right keyword.

Thanks for your help. It's appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,003
Members
448,935
Latest member
ijat

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