data may exist pop-up

N

new girl

I recorded a macro that makes a series of charts and reports. After
pull the information off the tabs, I try to delete them. I get a pop-u
saying 'data may exist in the tabs selected for deletion' I click o
and the macro runs fine. Is there any way to get rid of this pop-up
 
M

mark_landi

You need to go into the VB code and add a code line to the effect o
SetWarnings=No. This will answer all pop up warning messages
 
M

mark_landi

Add this line before line in VBcode:
Application.DisplayAlerts = False
Add this line after line in VBcode:
Application.DisplayAlerts = Tru
 
G

Gord Dibben

Sub SheetDelete()
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
End Sub

Copy/paste to a general module or use the guts of it in your existing delete
sheet code.

Gord Dibben Excel MVP
 
Top