Delete Sheet w/o warning prompt...

G

Guest

I've got a project that uses a Master workbook and subsequently copies a
worksheet from 1 of 10 different workbooks, runs some calculations on the
summary, and then deletes the worksheet that I rename 'TempData'. I rename
the imported sheet 'TempData' to maintain consistency in the code since the
data compilation is the same for each of the 10 different sheets imported.

I've got it set up so that it will copy the sheet over to the Master
workbook and run the calculations and then Delete the imported sheet
'TempData'.

The problem I'm experiencing is that I get the prompt telling me that any
data on that sheet will be lost and am I sure I want to delete this sheet.

That makes an long automated process required user interaction 10 times to
acknowledge the deletion of the 'TempData' sheet.

Can I force EXCEL to delete the sheet w/o the warming prompt?

Thanks
 
D

Die_Another_Day

Application.DisplayAlerts = False
Sheets("YourSheet").Delete
Application.DisplayAlerts = True

Charles Chickering
 
G

Guest

application.enablealerts = false
'delete your sheet
application.enablealerts = true
 
G

Guest

application.displayalerts not enablealerts... Sorry. I must be losin' it...

application.displayalerts = false
'Delete your sheet
application.displayalerts = true
 
G

Guest

Application.Displayalerts = False
worksheets("TempData").Delete
Application.Displayalerts = True
 
G

GKeramidas

one of those days, huh jim<g>

--


Gary


Jim Thomlinson said:
application.displayalerts not enablealerts... Sorry. I must be losin'
it...

application.displayalerts = false
'Delete your sheet
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

Top