Home All Groups Group Topic Archive Search About

event with commanbar button right_click?

Author
11 Oct 2005 10:49 PM
RB Smissaert
Would it somehow be possible to trigger an event on right-clicking a
commandbar button?

These buttons are created like this:

Public cb2 As CommandBar

    Set cb2 = CommandBars.Add("MyOptionsPopUp", _
                              msoBarPopup, _
                              MenuBar:=False, _
                              temporary:=True)

    With cb2
        Set FileControl = .Controls.Add(Type:=msoControlPopup)
        With FileControl
            .Caption = "File"
            With .Controls.Add(Type:=msoControlButton)
                .Caption = "Open report    (F3  OR  O from the treeview)"
                .OnAction = "OpenReport"
                .FaceId = 23
            End With

            etc.


The purpose is to trigger context sensitive help on the menu.


RBS

Author
12 Oct 2005 1:42 AM
Veign
If this a DotNet question?  What CommandBar?

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


Show quoteHide quote
"RB Smissaert" <bartsmissa***@blueyonder.co.uk> wrote in message
news:OttrgYrzFHA.904@tk2msftngp13.phx.gbl...
> Would it somehow be possible to trigger an event on right-clicking a
> commandbar button?
>
> These buttons are created like this:
>
> Public cb2 As CommandBar
>
>    Set cb2 = CommandBars.Add("MyOptionsPopUp", _
>                              msoBarPopup, _
>                              MenuBar:=False, _
>                              temporary:=True)
>
>    With cb2
>        Set FileControl = .Controls.Add(Type:=msoControlPopup)
>        With FileControl
>            .Caption = "File"
>            With .Controls.Add(Type:=msoControlButton)
>                .Caption = "Open report    (F3  OR  O from the treeview)"
>                .OnAction = "OpenReport"
>                .FaceId = 23
>            End With
>
>            etc.
>
>
> The purpose is to trigger context sensitive help on the menu.
>
>
> RBS
>
Author
12 Oct 2005 3:09 PM
Ken Halter
"Veign" <NOSPAMinveign@veign.com> wrote in message
news:ekbTF7szFHA.3892@TK2MSFTNGP12.phx.gbl...
> If this a DotNet question?  What CommandBar?
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --

fwiw, I assumed he was talking about this, extremely cool, control... y'all
were right though... I guess it was a dotnet question.

vbAccelerator CommandBar Control
http://www.vbaccelerator.com/home/VB/Code/Controls/Command_Bar/vbAccelerator_CommandBar_Control/article.asp

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
Author
12 Oct 2005 4:58 PM
Veign
I had thought the same thing but had vaguely remember DotNet having a
commandbar control - will know more once I install VS2005 (not beta)...

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


Show quoteHide quote
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:uDPiz7zzFHA.2132@TK2MSFTNGP15.phx.gbl...
> "Veign" <NOSPAMinveign@veign.com> wrote in message
> news:ekbTF7szFHA.3892@TK2MSFTNGP12.phx.gbl...
>> If this a DotNet question?  What CommandBar?
>>
>> --
>> Chris Hanscom - Microsoft MVP (VB)
>> Veign's Resource Center
>> http://www.veign.com/vrc_main.asp
>> Veign's Blog
>> http://www.veign.com/blog
>> --
>
> fwiw, I assumed he was talking about this, extremely cool, control...
> y'all were right though... I guess it was a dotnet question.
>
> vbAccelerator CommandBar Control
> http://www.vbaccelerator.com/home/VB/Code/Controls/Command_Bar/vbAccelerator_CommandBar_Control/article.asp
>
> --
> Ken Halter - MS-MVP-VB - http://www.vbsight.com
> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
> Please keep all discussions in the groups..
>
Author
12 Oct 2005 5:30 PM
RB Smissaert
It was a VBA question and was meant to got to Excel.Programming.
I don't use any .Net.

RBS

Show quoteHide quote
"Veign" <NOSPAMinveign@veign.com> wrote in message
news:OsbfX70zFHA.664@tk2msftngp13.phx.gbl...
>I had thought the same thing but had vaguely remember DotNet having a
>commandbar control - will know more once I install VS2005 (not beta)...
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --
>
>
> "Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
> news:uDPiz7zzFHA.2132@TK2MSFTNGP15.phx.gbl...
>> "Veign" <NOSPAMinveign@veign.com> wrote in message
>> news:ekbTF7szFHA.3892@TK2MSFTNGP12.phx.gbl...
>>> If this a DotNet question?  What CommandBar?
>>>
>>> --
>>> Chris Hanscom - Microsoft MVP (VB)
>>> Veign's Resource Center
>>> http://www.veign.com/vrc_main.asp
>>> Veign's Blog
>>> http://www.veign.com/blog
>>> --
>>
>> fwiw, I assumed he was talking about this, extremely cool, control...
>> y'all were right though... I guess it was a dotnet question.
>>
>> vbAccelerator CommandBar Control
>> http://www.vbaccelerator.com/home/VB/Code/Controls/Command_Bar/vbAccelerator_CommandBar_Control/article.asp
>>
>> --
>> Ken Halter - MS-MVP-VB - http://www.vbsight.com
>> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
>> Please keep all discussions in the groups..
>>
>
>
Author
12 Oct 2005 2:44 AM
Jeff Johnson [MVP: VB]
"RB Smissaert" <bartsmissa***@blueyonder.co.uk> wrote in message
news:OttrgYrzFHA.904@tk2msftngp13.phx.gbl...

> Public cb2 As CommandBar

You can't use CommandBars in "pure" VB and this group is for writing
programs in "pure" VB. Is this question about VBA in an Office app?
Author
12 Oct 2005 6:50 AM
RB Smissaert
Sorry, it went to the wrong group.

RBS

Show quoteHide quote
"RB Smissaert" <bartsmissa***@blueyonder.co.uk> wrote in message
news:OttrgYrzFHA.904@tk2msftngp13.phx.gbl...
> Would it somehow be possible to trigger an event on right-clicking a
> commandbar button?
>
> These buttons are created like this:
>
> Public cb2 As CommandBar
>
>    Set cb2 = CommandBars.Add("MyOptionsPopUp", _
>                              msoBarPopup, _
>                              MenuBar:=False, _
>                              temporary:=True)
>
>    With cb2
>        Set FileControl = .Controls.Add(Type:=msoControlPopup)
>        With FileControl
>            .Caption = "File"
>            With .Controls.Add(Type:=msoControlButton)
>                .Caption = "Open report    (F3  OR  O from the treeview)"
>                .OnAction = "OpenReport"
>                .FaceId = 23
>            End With
>
>            etc.
>
>
> The purpose is to trigger context sensitive help on the menu.
>
>
> RBS
>