creating Pivot Tables in Macros

  • Thread starter Thread starter Matthew McManus
  • Start date Start date
M

Matthew McManus

I have a macro which creates a Pivot Table - I copy the Pivot Table inf
into my original worksheet. I then have an instruction to delete th
new work sheet used while the Table was being made. When I run th
macro, I get the dialogue box asking if I really want to delete thi
worksheet ("The worksheet will be pemanently deleted"...)

Can I write something into the macro so that the worksheet is alway
deleted and I don't get this dialogue box?

Thanks

Matthe
 
You can turn off alerts before deleting the worksheet, and turn then
back on later:

Application.DisplayAlerts = False
'your code to delete the worksheet here
Application.DisplayAlerts = True
 

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