View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
bill_morgan bill_morgan is offline
external usenet poster
 
Posts: 29
Default VBA Bypass Delete Sheet Warning

So simple! Thanks, Gary ...

"Gary Keramidas" wrote:

something like this

Sub delsheet()

Application.DisplayAlerts = False
Worksheets("sheet3").Delete
Application.DisplayAlerts = True
End Sub

--


Gary


"bill_morgan" wrote in message
...
Friends,

I have written VBA code that loops through 150 workbooks and performs
various tasks on each workbook. One task I need to perform is deleting one
sheet in each workbook.

Problem is, the Excel Delete Sheet Warning message box appears before each
deletion, which means I need to manually confirm the deletion 150 times. Is
there a VBA way to turn off Excel's delete sheet warning (like there is in
Access)?

Thanks for your help ...

bill morgan