ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   making drop downs "volatile" (https://www.excelbanter.com/excel-programming/322793-making-drop-downs-volatile.html)

Wazooli

making drop downs "volatile"
 
I have a sheet that contains drop down combo boxes that reference cells on a
separate sheet that contain filenames. I can click on an entry in the combo
box, and the file is automatically opened. The problem is that whatever
filename is displayed in the combo box before I click does nothing, until I
click another, close the file, then go back to the original. I am assuming I
need a volatile call, but I am unsure how to implement this. Any help is
appreciated.

wazooli

P.S. The combo boxes are Active X components, not made via the 'forms'
toolbar.

Wazooli

making drop downs "volatile"
 
I guess what I'm really asking is how can I make the combo box "forget" what
value it contains before a change event.

"Wazooli" wrote:

I have a sheet that contains drop down combo boxes that reference cells on a
separate sheet that contain filenames. I can click on an entry in the combo
box, and the file is automatically opened. The problem is that whatever
filename is displayed in the combo box before I click does nothing, until I
click another, close the file, then go back to the original. I am assuming I
need a volatile call, but I am unsure how to implement this. Any help is
appreciated.

wazooli

P.S. The combo boxes are Active X components, not made via the 'forms'
toolbar.


sebastienm

making drop downs "volatile"
 
Hi,
If you track changes with the _Click event (instead of the change event,)
set the combobox value to Null right before the end of the sub. When setting
Combobox1.Value=Null, it does NOT trigger the _Click event (contrary to the
Change event).
Since after each selection the box is reset to <blank, when you choose a
new file (even if it is the same) it itriggers the event.

I hope this helps
Sebastien

"Wazooli" wrote:

I have a sheet that contains drop down combo boxes that reference cells on a
separate sheet that contain filenames. I can click on an entry in the combo
box, and the file is automatically opened. The problem is that whatever
filename is displayed in the combo box before I click does nothing, until I
click another, close the file, then go back to the original. I am assuming I
need a volatile call, but I am unsure how to implement this. Any help is
appreciated.

wazooli

P.S. The combo boxes are Active X components, not made via the 'forms'
toolbar.


Wazooli

making drop downs "volatile"
 
That does help. Thank you.

"sebastienm" wrote:

Hi,
If you track changes with the _Click event (instead of the change event,)
set the combobox value to Null right before the end of the sub. When setting
Combobox1.Value=Null, it does NOT trigger the _Click event (contrary to the
Change event).
Since after each selection the box is reset to <blank, when you choose a
new file (even if it is the same) it itriggers the event.

I hope this helps
Sebastien

"Wazooli" wrote:

I have a sheet that contains drop down combo boxes that reference cells on a
separate sheet that contain filenames. I can click on an entry in the combo
box, and the file is automatically opened. The problem is that whatever
filename is displayed in the combo box before I click does nothing, until I
click another, close the file, then go back to the original. I am assuming I
need a volatile call, but I am unsure how to implement this. Any help is
appreciated.

wazooli

P.S. The combo boxes are Active X components, not made via the 'forms'
toolbar.



All times are GMT +1. The time now is 03:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com