Can you disable all popup/error messages?

EssKayKay

Board Regular
Joined
Jan 5, 2003
Messages
233
Office Version
  1. 2007
Platform
  1. Windows
One more question if you please. Is it possible via VBA to disable all popup error messages?
Here's one that has me a bit annoyed.

1696531134798.png


Thanks,
Steve K.
 

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.
you can try this, but it may not stop THAT message.

usage: SetWarnings false

Code:
Private Sub SetWarnings(ByVal pbOn As Boolean)
   Application.DisplayAlerts = pbOn       'turn off sheet compatability msg
   Application.EnableEvents = pbOn
   Application.ScreenUpdating = pbOn
End Sub
 
Upvote 0
you can try this, but it may not stop THAT message.

usage: SetWarnings false

Code:
Private Sub SetWarnings(ByVal pbOn As Boolean)
   Application.DisplayAlerts = pbOn       'turn off sheet compatability msg
   Application.EnableEvents = pbOn
   Application.ScreenUpdating = pbOn
End Sub

OOPS – posted thread too soon.

Thanks RanMan for your quick response. I added your code into my worksheet but I am still receiving the error message. However, I may have inserted it in the wrong place or attempting to run in incorrectly. I’ll play with this a bit more.

Again, thanks
 
Upvote 0
you can just use:
Application.DisplayAlerts = FALSE

but that error may be too severe to be ignored by the command.
 
Upvote 0
you can just use:
Application.DisplayAlerts = FALSE

but that error may be too severe to be ignored by the command.
I tried that but I still see the message. My work-around is to first display my own MsgBox message briefly explaining what to do before the internal Excel message appears.

Thanks for your suggestion. Like I've stated before, you guys here are so helpful - much appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,222
Messages
6,123,709
Members
449,118
Latest member
MichealRed

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