Please Help w/ Macro!!!

  • Thread starter Thread starter Lovebaby
  • Start date Start date
L

Lovebaby

I get spreadsheets that have numerous (superfluous) tabs that I must delete
every time before I present the data.

When I record a macro to delete these tabs and then execute it, I still have
to respond to the dialog box - " do you want to delete this worksheet as it
may contain links to other worksheets".

There are 22 tabs (worksheets) that I must delete, so even with my macro, I
have to press Enter 22 times - not very efficient!!!

Any ideas to eliminate or bypass the dialog box and have the macro
automatically delete the tabs?
 
application.displayalerts = false
'your code to delete your 22 sheets
application.displayalerts = true
 
Thanks, but I'm not VBA savvy. Could you give me a little more detail how I
would use these statements or where I would put them?
 
You have code in your macro to delete the 22 worksheets.

Just make sure that each set of delete statements is surrounded by those
statements:

application.displayalerts = false
worksheets("Sheet9999").delete
worksheets("sheet8888").delete
application.displayalerts = true

if this doesn't help, you may want to post the relevant portion of your code.
 

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