VBA: Can I suppress Select Sheet dialog box

hellsreach

New Member
Joined
Dec 22, 2015
Messages
19
I have a script that uses a Replace to change one link to another sheet in a different file. No matter what I do, the script gives me a Select Sheet dialog box because it cannot find the tab in question (it doesn't exist yet). If I hit "Cancel" is cancels that dialog box and I get a #Ref error which I 100% ok with. Neither Application.DisplayAlerts = False, Application.AskToUpdateLinks = False solves the issue. Unfortunately, I do this replace on dozens of links, so hitting cancel over and over it completely stupid.

What I WANT is to automatically default to Cancel. Can I do that? Like I said, I'm fine with the error. The sheet in question doesn't exist yet, but will in to days following the "rolling." script.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Is calculation set to manual?
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,679
Members
449,463
Latest member
Jojomen56

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