Hello, I am using Excel 2003 and I am unable to delete any worksheets contained within any of my workbooks (except my workbook named: 4-3-2-1 Report.xls). When I do, the Excel Security Warning pops-up (Screen-shot attached) and opens up my workbook named: 4-3-2-1 Report.xls. I originally created the 4-3-2-1 Report.xls workbook to prevent the user accidently deleting Sheet1. Strangely, I am able to delete all the other worksheets contained in workbook named: 4-3-2-1 Report.xls (Except: Sheet1). I do not understand why I am unable to delete any worksheets from my other workbooks?? and it seems strange that when I do, the macro contained within the workbook named: 4-3-2-1 Report.xls is autmatically activated.
I copied the "RefuseToDelete" macro from another forum. It seems to work OK. I have tried deleting the macro and the VBA code for Sheet1 (in workbook named: 4-3-2-1 Report.xls) but it made no difference
Everytime I wish to delete a worksheet from another workbook, I keep getting various pop-up messages (usually saying things like: unable to find file or unable to locate the macro "RefuseToDelete" etc...)
Any suggestions on what I can do please?
Kind regards,
Chris 
Sub RefuseToDelete()
MsgBox "This sheet should not be deleted!", _
Buttons:=vbExclamation, _
Title:="Cannot Delete This Sheet!"
End Sub
Sheet1 Code:
Private Sub Worksheet_Activate()
Dim CB As CommandBar
Dim Ctrl As CommandBarControl
For Each CB In Application.CommandBars
Set Ctrl = CB.FindControl(ID:=847, recursive:=True)
If Not Ctrl Is Nothing Then
Ctrl.OnAction = "RefuseToDelete"
Ctrl.State = msoButtonUp
End If
Next
End Sub
Private Sub Worksheet_Deactivate()
Dim CB As CommandBar
Dim Ctrl As CommandBarControl
For Each CB In Application.CommandBars
Set Ctrl = CB.FindControl(ID:=847, recursive:=True)
If Not Ctrl Is Nothing Then Ctrl.OnAction = ""
Next
End Sub
Private Sub ResetDelete()
Dim CB As CommandBar
Dim Ctrl As CommandBarControl
For Each CB In Application.CommandBars
Set Ctrl = CB.FindControl(ID:=847, recursive:=True)
If Not Ctrl Is Nothing Then Ctrl.Reset
Next CB
End Sub
Bookmarks