Are you tired of annoying warnings when you open a workbook

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
3,130
Office Version
  1. 365
Platform
  1. Windows
Does this happen to you? I tell Excel not to display alerts about links. I open the workbook and, low and behold, a warning that it can't connect to my link!! Even though the link is in the same place on the server as it always has been, and all the formulas based on the links work just fine, go figure!!
Screenshot 2022-11-23 104411.png


So, I added this to temporarily not display alerts while the WB is loading. As soon as the workbook loads, one of the sheets gets activated and triggers the second sub to turn the alerts back on. If you like it, give it a thumbs up.

Put this code in THISWORKBOOK
VBA Code:
Private Sub Workbook_Open()
  Application.DisplayAlerts = False
  Startup = True
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
  If Startup = True Then
    Startup = False
    Application.DisplayAlerts = True
  End If
End Sub

Put this code at the top of a standard module
VBA Code:
Public Startup As Boolean
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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