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