Invalidate
Public Sub InitialiseAddInsRibbon(ribbon As IRibbonUI)
set mRibbonUI = ribbon
End Sub
Public Sub RefreshAddInsRibbon
mRibbonUI.Invalidate
DoEvents
End Sub
InvalidateControl
'Callback for editYears getText
Sub GetYears(control As IRibbonControl, ByRef sNumberOfYears)
sNumberOfYears = ThisWorkbook.Sheets("User Input").Range("C23")
If myRibbon Is Nothing Then
Set myRibbon = GetRibbon(sNumberOfYears)
myRibbon.InvalidateControl "editYears"
Else
sNumberOfYears = ThisWorkbook.Sheets("User Input").Range("C23")
myRibbon.InvalidateControl "editYears" 'it fails on the Else clause
End If
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext