Forum Discussion
CA18UK
Feb 15, 2023Copper Contributor
Add-ins tab not showing - have tried everything!
Hi have an add-in that works on all laptops I've used so far, except my latest one. It's Windows 11 and the Excel is version 2301. The add-in appears to load when starting excel, and it's showing as ...
- Feb 17, 2023Perhaps my page on Excel issues has some clues? https://jkp-ads.com/Articles/StartupProblems.asp
JKPieterse
Feb 15, 2023Silver Contributor
CA18UK Just so we know whether there isn't something amiss, try this:
- Paste below code into a new module and run the sub called CreateMenu
- Go to Excel and see if the add-ins tab appears
- Run the routine RemoveMenu to remove it again
Sub CreateMenu()
Dim oMainCtl As Object
Dim oCTl As Office.CommandBarControl
Set oMainCtl = Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30007, recursive:=True)
On Error Resume Next
oMainCtl.Protection = msoBarNoProtection
Set oMainCtl = oMainCtl.Controls.Add(Type:=msoControlPopup, temporary:=True)
With oMainCtl
.Caption = "&Testing Main Menu"
.Tag = "FOOBAR"
End With
Set oCTl = oMainCtl.Controls.Add(Type:=msoControlButton, temporary:=True)
With oCTl
.Caption = "Testing"
.Style = msoButtonIconAndCaption
.FaceId = 486
.Tag = "FOOBAR"
.OnAction = "'" & ThisWorkbook.Name & "'!Foobar"
End With
End Sub
Sub foobar()
MsgBox "it works"
End Sub
Sub RemoveMenu()
Dim oCTl As CommandBarControl
For Each oCTl In Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30007, recursive:=True).Controls
If oCTl.Tag = "FOOBAR" Then
oCTl.Delete
End If
Next
Set oCTl = Nothing
End Sub
CA18UK
Feb 15, 2023Copper Contributor
Thank you for replying! VBA isn't my strong point but I've run that macro a few times on a blank workbook, and nothing happens. FYI I've uninstalled Microsoft 365 and reinstalled, but no change.
I recorded a very simple macro that writes 'Hello' in a cell, and that works when I run it.
- JKPieterseFeb 16, 2023Silver ContributorIn Excel, export your ribbon customizations (from File, Options, Ribbon tab).
Close Excel.
Locate your Excel15.xlb file from %appdata%\microsoft\Excel (it holds your ribbon customizations and sometimes gets corrupted).
Delete that file and try again.- CA18UKFeb 17, 2023Copper Contributor
JKPieterse Hi Jan
I just tried that (didn't have my laptop yesterday) and the tab still won't show its face.
I really appreciate you trying to solve this.
- JKPieterseFeb 17, 2023Silver ContributorPerhaps my page on Excel issues has some clues? https://jkp-ads.com/Articles/StartupProblems.asp