1 open事件
2.beforeclose
’下面代码使得程序不会被关闭,只能手工运行代码关闭
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
End Sub
3.禁止打印
Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "禁止打印"
Cancel = True
End Sub
4.禁止插入新的工作表
5.beforesave
6.workbookactive
设计小程序时候出现自定义菜单。当焦点转移时候需要把菜单恢复或者删除
7workbookdeactive
8workbook slection change
该代码使用于workbook下所有的sheet表