RobBroekhuis
Technical User
Hi all,
I have a combobox control on a worksheet, which I am using to set the criteria range of an advanced filter operation (Dale would be proud of me ;-)). Since the combobox choices depend on the sheet's contents, which may change, I wrote code to regenerate the combobox list dynamically, and put it in the sheet's combobox_enter event handler. It worked great - once. After first entering the combobox, it seems like the enter event is never triggered again. According to VBA help, the enter event occurs when the focus passes from one control to another on a userform. Of course, my control is not on a userform, and typically a sheet range, rather than a different control, has focus when I go to select from the combobox. I tried another event, DropButtonClick, which got me into trouble because it is triggered not only when the list drops down, but also when it comes back up. What is the appropriate event (or workaround) to use?
Rob
![[flowerface] [flowerface] [flowerface]](/data/assets/smilies/flowerface.gif)
I have a combobox control on a worksheet, which I am using to set the criteria range of an advanced filter operation (Dale would be proud of me ;-)). Since the combobox choices depend on the sheet's contents, which may change, I wrote code to regenerate the combobox list dynamically, and put it in the sheet's combobox_enter event handler. It worked great - once. After first entering the combobox, it seems like the enter event is never triggered again. According to VBA help, the enter event occurs when the focus passes from one control to another on a userform. Of course, my control is not on a userform, and typically a sheet range, rather than a different control, has focus when I go to select from the combobox. I tried another event, DropButtonClick, which got me into trouble because it is triggered not only when the list drops down, but also when it comes back up. What is the appropriate event (or workaround) to use?
Rob
![[flowerface] [flowerface] [flowerface]](/data/assets/smilies/flowerface.gif)