macro recorded in xl2002 leaves a message box

T

Tonso

I recorded a macro to move a sheet from an exp file to an xls file.
It works fine, except that it leaves this message when I delete the
sheet .. "Data may exist in the sheets selected for deletion. To
permanently delete the data, press Delete". The relavent code looks
like this...

Sheets("wblank").Select
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.Delete
Sheets("Table").Select

What must I change to avoid having to press "Delete" at the end of the
macro?

As always, your help will be greatly aprreciated.

Thanks,

Tonso
 
D

Dave Peterson

application.displayalerts = false
sheets("wblank").delete
application.displayalerts = true
 
T

Tonso

application.displayalerts = false
sheets("wblank").delete
application.displayalerts = true









--

Dave Peterson- Hide quoted text -

- Show quoted text -

Dave,

Thank you so very much for your expert help! You guys add so much to
the value of Excel!

Tonso
 

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

Top