Skip to content

Commit 52dcd3b

Browse files
tduguidtduguid
authored andcommitted
Updated the dropdown value list procedure and the copyright formatting
1 parent cce2703 commit 52dcd3b

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,4 @@ ModelManifest.xml
192192
/.vs/slnx.sqlite
193193
/.vs
194194
/publish/Application Files/ScriptHelp_3_0_0_2/ApiHelp.shfbproj.deploy
195+
/VB/packages/log4net.2.0.8

VB/Ribbon.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
imageMso="Help"
186186
size="large"
187187
screentip="How To..."
188-
supertip="This opens the read me page in GitHub with detailed instructions of the Add-In functionality."
188+
supertip="This opens the read me page from the site with detailed instructions of the Add-In functionality."
189189
/>
190190
<button
191191
id="btnOpenNewIssue"
@@ -194,7 +194,7 @@
194194
imageMso="MacroSecurity"
195195
size="large"
196196
screentip="Report An Issue"
197-
supertip="This will open a new issue page in GitHub. The user will need to login to raise an issue."
197+
supertip="This will open a new issue from the site. The user will need to login to raise an issue."
198198
/>
199199
</group>
200200
<group
@@ -204,26 +204,32 @@
204204
<labelControl
205205
id="lblDescription"
206206
label="Add-In Name:"
207+
enabled="false"
207208
/>
208209
<labelControl
209210
id="lblReleaseDate"
210211
label="Release Date: "
212+
enabled="false"
211213
/>
212214
<labelControl
213215
id="lblCopyright"
214216
label="Copyright: "
217+
enabled="false"
215218
/>
216219
<labelControl
217220
id="txtDescription"
218221
getLabel="GetLabelText"
222+
enabled="false"
219223
/>
220224
<labelControl
221225
id="txtReleaseDate"
222226
getLabel="GetLabelText"
227+
enabled="false"
223228
/>
224229
<labelControl
225230
id="txtCopyright"
226231
getLabel="GetLabelText"
232+
enabled="false"
227233
/>
228234
</group>
229235

VB/Scripts/Ribbon.vb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ Imports System.Windows.Forms
55

66
Namespace Scripts
77

8-
''' <summary>
9-
''' The ribbon code used for the addin
10-
''' </summary>
11-
''' <remarks></remarks>
128
<Runtime.InteropServices.ComVisible(True)>
139
Public Class Ribbon
1410
Implements Office.IRibbonExtensibility
@@ -69,8 +65,11 @@ Namespace Scripts
6965
End Function
7066

7167
Public Function GetItemLabel(control As Office.IRibbonControl, index As Integer) As String
72-
Dim tbl As Excel.ListObject = Globals.ThisAddIn.Application.ActiveCell.ActiveCell.ListObject
68+
Dim tbl As Excel.ListObject = Nothing
7369
Try
70+
If ErrorHandler.IsValidListObject Then
71+
tbl = Globals.ThisAddIn.Application.ActiveCell.ListObject
72+
End If
7473
If (tbl Is Nothing) Or index = 0 Then
7574
ErrorHandler.CreateLogRecord("EMPTY")
7675
Return String.Empty
@@ -90,8 +89,11 @@ Namespace Scripts
9089
End Function
9190

9291
Public Function GetItemCount(control As Office.IRibbonControl) As Integer
93-
Dim tbl As Excel.ListObject = Globals.ThisAddIn.Application.ActiveCell.ListObject
92+
Dim tbl As Excel.ListObject = Nothing
9493
Try
94+
If ErrorHandler.IsValidListObject Then
95+
tbl = Globals.ThisAddIn.Application.ActiveCell.ListObject
96+
End If
9597
If (tbl Is Nothing) Then
9698
Return 2
9799
Else

0 commit comments

Comments
 (0)