hey guys, how do i suppress this error message? i already tried application.displayalerts = false and added on error resume next, but when i run the code (F5), once it hits the errors it exits.
![error pop up]()
i'm trying to delete all the named ranges in excel
Sub test()
Dim x As Integer
x = 1
Application.DisplayAlerts = False
On Error Resume Next
For x = 1 To 100
ActiveWorkbook.Names(x).De
lete
Next
Application.DisplayAlerts = True
End Sub
i tried do until err<>0 but the same problem still happens - once it hits an invalid reference it stops. thanks guys!!
DoCmd.SetWarnings False
refer
http://www.mrexcel.com/forum/microsoft-access/89057-can-you-supress-display-alerts-via-visual-basic-applications.html