View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Crowbar via OfficeKB.com Crowbar via OfficeKB.com is offline
external usenet poster
 
Posts: 128
Default Delete worksheet - dialog box showing

You need to disable alerts

application.displayalerts = false

Function DeleteSheet(strSheetName As String) As Boolean
' This function deletes a sheet based on the individual name provided
' If the sheet is not found the code moves on.
On Error Resume Next
Application.DisplayAlerts = False
PriorityExcel.Sheets(strSheetName).Delete
Application.DisplayAlerts = True
End Function




--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1