• Editing a command bar (97)

    Author
    Topic
    #372865

    Editing a command bar
    I

    Viewing 0 reply threads
    Author
    Replies
    • #597259

      Your error message is complaining that “Type” isn’t an argument of “Controls”. You need to have an actual control assigned to arg1, not a collection of controls. Maybe you were trying to use the FindControl method?

      Anyhoo… this code will wipe out all combo controls on the commandbar:

      For Each ctrl In CommandBars("Filter Form").Controls
          ' You can also check the values of ctrl.Caption, ctrl.Visible, ctrl.OnAction
          If ctrl.Type = msoControlComboBox Then
              ctrl.Delete
          End If
      Next
      
    Viewing 0 reply threads
    Reply To: Editing a command bar (97)

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

    Your information: