Automatically Say Yes to Excel Questions and Continue Loop

RG FL

New Member
Joined
Mar 1, 2007
Messages
37
I'm working on automatically refreshing files with pivot tables with a macro. However, the macro execution stops temporarily when excel asks the following:

Do you want to replace the contents of the destination cells in "Sheet Name referenced here"?

How can I automatically say yes to these requests for information?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
See if this works for you, at the beginning of your code, put:

Application.DisplayAlerts = False

and before your code ends:

Application.DisplayAlerts = True
 
Upvote 0

Forum statistics

Threads
1,215,831
Messages
6,127,140
Members
449,362
Latest member
Bracelane

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