..and I have forgot to mention below code is present in RibbonModule in order to load ribbon
Code:
Option Explicit
Dim Rib As IRibbonUI
Dim MyTag As String
Sub RibbonOnLoad(ribbon As IRibbonUI)
Set Rib = ribbon
End Sub
Sub GetVisible(control As IRibbonControl, ByRef visible)
If MyTag = "show" Then
visible = True
Else
If control.Tag Like MyTag Then
visible = True
Else
visible = False
End If
End If
End Sub
Sub RefreshRibbon(Tag As String)
MyTag = Tag
If Rib Is Nothing Then
MsgBox "Error, restart your workbook"
Else
Rib.Invalidate
End If
End Sub
Bookmarks