Thread
:
Is there a Sheet delete property?
View Single Post
#
6
Posted to microsoft.public.excel.programming
Vic Eldridge
external usenet poster
Posts: 50
Is there a Sheet delete property?
(Rick De Marco) wrote in message . com...
Does anyone have any ideas on my original question? See my first post
in this message??
Yes, make Excel's two Delete Sheet buttons run your own macro instead.
Private Sub Workbook_Open()
CommandBars("Edit").FindControl(ID:=847).OnAction = "MySheetDeleteMacro"
CommandBars("Ply").FindControl(ID:=847).OnAction = "MySheetDeleteMacro"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
CommandBars("Edit").FindControl(ID:=847).OnAction = ""
CommandBars("Ply").FindControl(ID:=847).OnAction = ""
End Sub
Sub MySheetDeleteMacro()
MsgBox "Do you really want to delete " & ActiveSheet.Name & " ?"
End Sub
Regards,
Vic Eldridge
Reply With Quote
Vic Eldridge
View Public Profile
Find all posts by Vic Eldridge