Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Editing a command bar (97)

    Editing a command bar
    I

  2. #2
    Star Lounger
    Join Date
    Jun 2002
    Posts
    98
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Editing a command bar (97)

    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:
    <pre>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
    </pre>

    __________________________________________________ ____
    <img src=/S/nun.gif border=0 alt=nun width=20 height=20> Sister Dory
    Our Lady of Perpetual Help, Holstein Falls, Wisconsin, USA

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Editing a command bar (97)

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •