Hi All,
I've created an excel document with many defined names.
I have created some comboboxes users can use to select some values. I use defined names as ListFillRange for the comboboxes.
I also have a linkedcell for each combobox (in the A-column, which is unprotected but hidden from the users).
The whole sheet the user sees, is protected (except for the A-column, but that one is hidden).
The sheet also does not show any headings and no grid. Just for your information...
The problem that I have is the following:
I have many lines of VBA code written. All code is working fine, except for the following: (in the Microsoft Excel Objects, in the correct sheet (so not in module, nor in class module))
The sub mentioned above should reset the combobox entry to the standard country if the user changed it to an unwanted value.Please Login or Register to view this content.
However, the change fires multiple times, namely 3 times!
My explanation for this is the following:
First time it fires: change to "=A11",
Second time it fires: change to the value of A11, namely "=DefinedNameCountryStandard"
Third time it fires: change to the value of DefinedNameCountryStandard, namely "The Netherlands".
I think it's weird that the combobox_change() fires three times, while I expected it to fire only once.
I tried using Application.EnableEvents = False, but that doesn't work. After some searching on Google I've learned that it doesn't work on user input fields, such as ComboBoxes.
Then I tried building a variable in my VBA code, but I couldn't get that to work. I tried using a Cell "A20" as a boolean (True/False) and using it like this:
This code sometimes works fine in my excel document, but sometimes it doesn't and I can't find out why (I'm debugging quite a lot the past few days).Please Login or Register to view this content.
The sub combobox_change keeps firing multiple times, and same goes for some - if not all - other comboboxes I'm using.
Because of security-issues I can't post the file, but I've provided you with all the information I think is necessary.
If anyone else knows a workaround or a solution to my problem, please tell me...
Thanks,
Percy Dobbelsteyn
Bookmarks