-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmRibbonSVC.bas
96 lines (64 loc) · 1.8 KB
/
mRibbonSVC.bas
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Attribute VB_Name = "mRibbonSVC"
Option Explicit
Public isFirstOptionQ As Boolean
Public iSHstbar As Boolean
Public vIsSuppresPressed As Boolean
Public vIRibbonUI As IRibbonUI
Sub p_iSHstbar()
On Error Resume Next
iSHstbar = False
If AddIns("Hstbar").Installed Then 'Hyperion.CommonAddin
iSHstbar = True
End If
If Err.Number <> 0 Then
iSHstbar = False
Err.Clear
End If
End Sub
Sub p_RefreshRibbonNow()
On Error Resume Next
Call p_restoreOptions
vIRibbonUI.Invalidate
If Err.Number > 0 Then
Err.Clear
End If
isFirstOptionQ = True
End Sub
Sub p_OnRibbonLoad(vRibbon As IRibbonUI)
Call p_iSHstbar
Application.MultiThreadedCalculation.Enabled = True
Application.AutoRecover.Time = 7
Application.EnableEvents = True
Set vIRibbonUI = vRibbon
vItWasOtlPage = False
isHypShowPov = True
vIsSVEnabled = False
vIsSuppresPressed = False
X = HypSetMenu(iSHstbar)
vIsFirstRetrive = True
vIsUseNameDefault = True
isFirstOptionQ = True
End Sub
Function isSheetOTL() As Boolean
isSheetOTL = False
If (InStr(UCase(ActiveSheet.Name), "OTL") > 0) Then
isSheetOTL = True
End If
End Function
Sub p_IsVisible(ByVal vIRibbonControl As IRibbonControl, ByRef vReturnValue)
vReturnValue = False
If vModeAnalyse = 0 Then
Select Case vIRibbonControl.ID
Case "grp_RData"
vReturnValue = True
Case "b_SheetInfo"
vReturnValue = True
Case "grp_Options"
vReturnValue = True
Case "grp_Main0"
vReturnValue = True
Case "grp_Refresh"
vReturnValue = True
End Select
End If
End Sub