Excel VBA to select "Yes to All" on prompt

Viewed 45

In my code I copy a worksheet from one file to another I get a prompt saying that the name ranges already exists. Click Yes / Yes to All / No ..." I want it to automatically select yes to all. Other posts show to use Application.DisplayAlerts = False then turn it on at the end. However when I add Application.DisplayAlerts = False the prompt selects No automatically so my sheet creates an external reference to the other file instead of the current version of the name.

0 Answers
Related