-
Notifications
You must be signed in to change notification settings - Fork 0
/
zWorkbook.cls
41 lines (36 loc) · 1.06 KB
/
zWorkbook.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "zWorkbook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Option Explicit
Const cPass As Double = 7895123.19701105
Private Sub Workbook_Activate()
Dim Wbk As Workbook
If Workbooks.Count = 0 Then Workbooks.Add
For Each Wbk In Workbooks
If Wbk.Name <> ThisWorkbook.Name Then
Workbooks(Wbk.Name).Activate
Exit For
End If
Next
ThisWorkbook.IsAddin = True
Application.Run "zmMain.RestoreOrgProperty", cPass
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Run "zmMain.RestoreOrgProperty", cPass
Application.OnKey "^%+R"
Application.OnKey "^%+V"
Application.OnKey "^%+K"
Application.OnKey "^%+C"
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub
Private Sub Workbook_Open()
Application.Run "zmMain.WbkOpen", cPass
End Sub