![]() |
#1
|
|||
|
|||
![]()
Know the solution is in this forum, just haven't been able to use the proper key words to find it.
As I want and expect, my combo box's _change() event triggers both when the client makes her first selection and upon making a different selection from that list. But there are actions that I need to duplicate when the client enters the combo box but does not change the selection. And I cannot seem to trigger a proper event for that situation. My change event uses the combo box's Listindex to populate three textboxes from corresponding arrays. Upon clicking my CommandButtonNext, the text boxes initialize to null for the next iteration. In most cases, they are to remain blank. But in some cases, they require repopulation. And in most of those cases, using the same data related to the last Combo Box event. So far, the only indication for that need for repopulation is when the client re-enters the combo box but does not change the selection, I've tried using the "_Click()" event. And considered the On_Exit() event. But I don't seem to get any event invoked when the selection remains unchanged. I am considering a rather draconian solution of creating null values in my arrays that correspond to a null value in my combo box that I would trigger upon the CommandButtonNext_Click() event. That would force the client to select anew and trigger the _change() event. But doubt that is the best solution. Ideally, when the client enters the combo box control, it will trigger an event even when the client makes no new selection that (1) does not interfere if she does make a selection (2) recognizes the Listindex of the last selection and (3) exits the sub() if no selection has yet been made. Last edited by grNadpa; 03-03-2022 at 04:40 PM. Reason: Adding tags |
#2
|
|||
|
|||
![]()
Opted to create null entries as the first entru in the combo boxes and arrays. Then set the .ListIndex to 0 on the Command Next. I'd be interested to know whether that qualifies as "best practices". But it worked.
|
![]() |
Tags |
events, vba combobox, word2016 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
KMan3210 | Word VBA | 4 | 12-06-2016 10:11 AM |
text based on Combo box selection | rosscortb | Word VBA | 3 | 03-16-2015 06:57 PM |
Combo Box Content Control Calculate on selection help | ciresuark | Word | 0 | 03-06-2015 01:49 PM |
![]() |
JustAboutNoon | Word VBA | 3 | 10-16-2014 08:41 PM |
How can I add hyperlink to open a word file from an excel combo box selection? | mahmoudramadan | Excel | 0 | 10-20-2012 10:41 AM |