Forum Discussion

Rod_Benson's avatar
Rod_Benson
Copper Contributor
Apr 30, 2024

Excel Addin tab suddenly disappeared today and I no matter what I do I can't get it back.

I develop vba code in excel for my own personal use and have always referenced them by adding to a menu to the main ribbon which appears as an addin tab. Today when I opened excel it was there at the beginning of the session but then suddenly it just disappeared and I cannot get it back with vba or by messing with the Excel options tab (either resetting the menus) or by playing with the security settings. I have tried researching the issue but all suggested solutions do not work. I have only recently upgraded to Windows 11. Is this a windows 11 issue with Office or has there been a very recent office windows update that might have caused this.  I even tried reinstalling office to no avail. The code I use to add stuff that appears in the addins tab is something like:

 

Dim MenuItem As CommandBarControl, NewMenuPopup As CommandBarControl, MenuBar As CommandBar
On Error Resume Next
Set MenuBar = Application.CommandBars(1)
MenuBar.Controls("PlateMaker").Delete
Set NewMenuPopup = MenuBar.Controls.Add(Type:=msoControlPopup, before:=MenuBar.Controls.Count - 2)
With NewMenuPopup
   .Caption = "Name"
   With .Controls.Add
      .Caption = "Menu Option 1"
      .OnAction = "VBASubroutineName"
   End With

End With

 

I know from the vba that the menu object is there but it just refused to now display on the tab meaning I can no longer run my programs. Any help would be much appreciated.

No RepliesBe the first to reply

Resources