The code that follows works perfectly in Excel 2013 and prior, but upon installing Excel 2016 (via Office 365 subscription) and opening one of my workbooks with custom ribbon tools, I get a "Can't find Library" error. ( there are no missing references)
Here is one sample Sub (dropdown control in ribbon) where the error pops up. The error is on the Call, where it doesn't like returnedVal.
'Callback for rxdrdnAcctName onAction
Sub rxdrdnAcctName_Click(control As IRibbonControl, id As String, index As Integer)
On Error Resume Next
Call rxDropDownItemLabel(control, index, returnedVal)
Sheets("Tables").Range("AcctNametoPlot").Value = returnedVal
If Err.Number <> 0 Then
LogError(Now & "...RibbonTool--> " & Err.Description)
End If
End Sub
Here is the code for the sub getting called
'Callback for rxdrdnAcctName getItemLabel
Sub rxDropDownItemLabel(control As IRibbonControl, index As Integer, ByRef returnedVal)
Dim varItems As Variant
If (control.id = "rxdrdnAcctName" Or control.id = "rxdrdnNewAcctName") Then
varItems = ThisWorkbook.Sheets("Tables").Range("SortedAcctList").Value
ElseIf (control.id = "rxdrdnYear" Or control.id = "rxdrdnNewAcctYear") Then
varItems = ThisWorkbook.Sheets("Tables").Range("YearsList").Value
ElseIf control.id = "rxdrdnMonth" Then
varItems = ThisWorkbook.Sheets("Tables").Range("MonthNames").Value
ElseIf control.id = "rxdrdnCommod" Then
varItems = ThisWorkbook.Sheets("Tables").Range("CommodityPLNamesList").Value
ElseIf control.id = "rxdrdnSheetSelectName" Then
varItems = ThisWorkbook.Sheets("Tables").Range("AllSheetsNames").Value
End If
returnedVal = varItems(index + 1, 1)
End Sub
What has changed in Excel 2016 (for customizing the ribbon) that has broken this code?