• Programmatically displaying Add-Ins tab

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Programmatically displaying Add-Ins tab

    Author
    Topic
    #506006

    I am trying to programmatically show the Add-Ins tab when excel starts. I also want to hide that tab when excel closes. This is only for a particular workbook. I tried to record the steps with the recorder to no avail. Any guidance or examples will be greatly appreciated.

    DennisK

    Viewing 2 reply threads
    Author
    Replies
    • #1568484

      The add-ins tab only shows when you have custom commandbar code.

    • #1568507

      I did not explain myself well… here is my code…

      Code:
      Private Sub Workbook_Open()
          AddIns("Analysis ToolPak").Installed = True
          AddIns("Analysis ToolPak - VBA").Installed = True
          
          Dim cmbBar As CommandBar
          Dim cmbControl As CommandBarControl
           
          Set cmbBar = Application.CommandBars("Worksheet Menu Bar")
          Set cmbControl = cmbBar.Controls.Add(Type:=msoControlPopup, temporary:=True) 'adds a menu item to the Menu Bar
          With cmbControl
              .Caption = "&Sort" 'names the menu item
              With .Controls.Add(Type:=msoControlButton) 'adds a dropdown button to the menu item
                  .Caption = "Sort 1" 'adds a description to the menu item
                  .OnAction = "SortFunc_Prog" 'runs the specified macro
                  .FaceId = 1098 'assigns an icon to the dropdown
              End With
          End With
      
          
      End Sub
      

      Again… what is my code to make sure that the “Add-Ins” tab displays. TIA.

      DennisK

    • #1568684

      You don’t need any. Simply adding the command bar controls should make the addins tab visible.

    Viewing 2 reply threads
    Reply To: Programmatically displaying Add-Ins tab

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: