Trapping events in standard commandbuttons 
Author Message
 Trapping events in standard commandbuttons

I am trying to trap the "change" event in Word's "Style" drop-down command
button. I have a global variable named StyleCommandBarControl, and the
following code:

Set StyleCommandBarControl =
g_WordApplication.CommandBars.FindControl(ID:=1732)

However, the StyleCommandBarControl_Change event is not getting anything.
Can I capture events from standard commandbar buttons?

Thanks



Wed, 15 Dec 2004 06:17:30 GMT  
 Trapping events in standard commandbuttons

Dunno - but the Access developer's handbook from Sybex does cover this
extensively.


Quote:
>I am trying to trap the "change" event in Word's "Style" drop-down command
>button. I have a global variable named StyleCommandBarControl, and the
>following code:

>Set StyleCommandBarControl =
>g_WordApplication.CommandBars.FindControl(ID:=1732)

>However, the StyleCommandBarControl_Change event is not getting anything.
>Can I capture events from standard commandbar buttons?

>Thanks

Steve Hudson - Word Heretic, Sydney, Australia
{*filter*} teacher, trainer, tutor, writer, developer

You agree by writing to me personally that any material can be reused publicly unless you explicitly disclaim it. (For List and blog use.)


Thu, 30 Dec 2004 10:11:30 GMT  
 Trapping events in standard commandbuttons
Hi Josh,

A couple of thoughts:

1) Have you performed all the preliminary incantations - such
as writing a "ComboBoxHandler" class - specified in Help for
the CommandBarComboBox's Change event?

2) Does your code work with a custom CommandBarComboBox rather
than a built-in one?



Quote:
>I am trying to trap the "change" event in Word's "Style" drop-down command
>button. I have a global variable named StyleCommandBarControl, and the
>following code:

>Set StyleCommandBarControl =
>g_WordApplication.CommandBars.FindControl(ID:=1732)

>However, the StyleCommandBarControl_Change event is not getting anything.
>Can I capture events from standard commandbar buttons?

>Thanks

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.



Thu, 30 Dec 2004 17:05:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How do I trap the close event for a standard email messages

2. Trapping of standard events

3. Add event code to CommandButtons

4. KeyUp Event with CommandButtons

5. Why does SS Tab trap key events before the form traps them

6. Combo Box - Not In List Event - Standard

7. Adding button w/ an event to standard outlook commandbar

8. ActiveX controls sending non-OLE standard data types in events

9. How trapping CommandBar Close Event

10. Events trapping

11. Trapping events using WithEvents parameter

12. Events trapping

 

 
Powered by phpBB® Forum Software