Results 1 to 4 of 4

Thread: CommandBarEvents

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Question

    This is really annoying the sh*t out of me!!!

    Does anyone know how to declare and use the CommandBarEvents property?

    The docs say you need to set your WithEvents variable to a CommandBarControl object, but I can't find one. All CommandBar Controls seem to be sub-divided into CommandBarButtons, CommandBarPopups and CommandBarComboBoxs.

    I'm trying to capture a click on the VBIDE 'New Project' in the File menu - I just can't get it working, I'm getting Type Mismatch because I can't find a god-damn CommandBarControl...


    Somebody come to my rescue or its seppuku time.



    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Lightbulb Sussed it...

    Its OK people...I figured it out.

    I was negelecting to use:

    VBE.Events.CommandBarEvents(CommandBarControl)


    Talk about torturous!

    ************************************************
    By the way, I'm needing to trap the click events on a few menu items and it would seem more sensible to trap the click on, for instance, the file menu, then select case for the specific control clicks I want to react to.

    Is this possible? Generally the way its done? Or do I have to set a withg events for every control invidiually?


    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  3. #3
    Member
    Join Date
    Dec 1999
    Posts
    41
    Where do we find CommandBar Control...I checked components under Project(since it wasn't there on ToolBox) but cudn find it...

    thanks
    neelesh

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Talking CBC

    CommandBarControls are the underlying controls of menus and toolbars in office applications.

    Look in your Object Browser for CommandBar etc.

    (part of the Office library).


    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

Posting Permissions

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



Click Here to Expand Forum to Full Width