Using Macro to Delete a tab in a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use a macro to delete a tab in a workbook. When I execute
the macro, I get the message asking if it is ok to delete the sheet. Is
there a way to have the macro answer the question "yes".

Thanks
 
Hi
add the line
application.displayalerts=false
before the delete statement and afterwards add:
application.displayalerts=true
 
Application.DisplayAlerts = False
''your code to delete worksheet here

Ray at work
 

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