data may exist pop-up

  • Thread starter Thread starter new girl
  • Start date Start date
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
 
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
 
Add this line before line in VBcode:
Application.DisplayAlerts = False
Add this line after line in VBcode:
Application.DisplayAlerts = Tru
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top