Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Identifying Worksheet Menu Bar Command (XL97:SR2)

    I'm trying to identify and disable a CommandBar in the Worksheet Menu Bar that is representive of the XL symbol. It is located left of the File drop-down. If it can not be disabled, is it possible to disable the right click option of this commandbar? If so does anyone know the code?

    Thanks,
    John

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Identifying Worksheet Menu Bar Command (XL97:SR2)

    Hi John,
    I don't know of any way of disabling that "control" as it's a feature of menubars (as opposed to standard commandbars). What you could do is disable the menubar and replace it with a standard commandbar containing all the same controls.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying Worksheet Menu Bar Command (XL97:S

    To disable each of the individual controls you need:

    Sub Disable()
    With CommandBars("Document")
    For i = 1 To .Controls.Count
    .Controls(i).Enabled = False
    Next i
    End With
    End Sub

    Presumably, you'll want something like

    CommandBars("Document").Reset

    as an Auto_Close event. Otherwise your users will be lacking functionality on re-opening Excel for another purpose.

    HTH
    Gre

Posting Permissions

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