none
DropDown Event handler RRS feed

  • Question

  • Hi,

    I'm creating a Word Document that has some Forms fields on it.  I am adding some VBA customizations.  For a Drop Down Form Field I see I have an option to run a macro on the Enter or Exit of the field, but I need to add some logic to the 'SelectedItemChanged' event, but that doesn't seem to exist.  Is there a way to add an event that doesn't exist??  If so, how would I do it??

    Thanks

     


    Brian
    Wednesday, December 15, 2010 6:52 PM

Answers

  • Hi Brian

    Unfortunately, no, there's no way to "extend" how a form field works, nor is there such an event.

    It would help to know which version(s) of Word you're targeting with this, but...

    1. Use an ActiveX dropdown control instead of a form field

    2. Assign an Enter macro to the field (as a text field, not  a dropdown) that opens a userForm. The dropdown you use in that form does have the event.


    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by Bruce Song Wednesday, December 22, 2010 11:13 AM
    • Marked as answer by Bessie Zhao Thursday, December 23, 2010 10:00 AM
    Thursday, December 16, 2010 7:28 AM
    Moderator