Hi All,
Our company has a little bit of VBA that we use in house on our local machines running Excel 2007, this code has been passed around the office and has been successfully deployed on about a dozen PC's, but for some reason when we run this code, it is not 'enabling' and displaying the Add-In tab in the Ribbon. See Screen shot of a successfully installation on someone else PC:
So when I run the same code on my PC, it displays the message box to say the script has run, but nothing actually appears.
I can confirm that I click the MS Button in the top left, go to Excel Options | Add-Ins | Press the Go button at the bottom and it shows the add-in as being checked and available.
I have also gone into Excel Options | Trust Center | Add-ins and can confirm that both 'Require application add ins to be signed by trusted publisher' and Disable All application add-ins are both UNCHECKED.
I am unsure what else to look into to get this working?
Any tips?
Our company has a little bit of VBA that we use in house on our local machines running Excel 2007, this code has been passed around the office and has been successfully deployed on about a dozen PC's, but for some reason when we run this code, it is not 'enabling' and displaying the Add-In tab in the Ribbon. See Screen shot of a successfully installation on someone else PC:
So when I run the same code on my PC, it displays the message box to say the script has run, but nothing actually appears.
I can confirm that I click the MS Button in the top left, go to Excel Options | Add-Ins | Press the Go button at the bottom and it shows the add-in as being checked and available.
I have also gone into Excel Options | Trust Center | Add-ins and can confirm that both 'Require application add ins to be signed by trusted publisher' and Disable All application add-ins are both UNCHECKED.
I am unsure what else to look into to get this working?
Any tips?
Code:
Sub AddMenu()
Dim cMenu1 As CommandBarControl
Dim cbMainMenuBar As CommandBar
Dim iHelpMenu As Integer
Dim cbcCutomMenu As CommandBarControl
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("&Conquest Automate").Delete
Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")
iHelpMenu = cbMainMenuBar.Controls("Help").Index
Set cbcCutomMenu = cbMainMenuBar.Controls.Add(Type:=msoControlPopup, Before:=iHelpMenu)
cbcCutomMenu.Caption = "&Conquest Automate"
With cbcCutomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Sewer Mains"
.OnAction = "SewerMainsRunAll"
.FaceId = 6850
End With
With cbcCutomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Sewer Structures"
.OnAction = "SewerStructuresRunAll"
.FaceId = 6854
End With
With cbcCutomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Stormwater Pipes"
.OnAction = "SWPipesRunAll"
.FaceId = 6859
End With
With cbcCutomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Stormwater Structures"
.OnAction = "SWStructuresRunAll"
.FaceId = 6852
End With
With cbcCutomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Water Mains"
.OnAction = "WaterPipesRunAll"
.FaceId = 6855
End With
MsgBox "Installer has run all the way through"
On Error GoTo 0
End Sub