Dear all,
I am facing a logical problem which I am not able to solve.
I have three dependent comboboxes in an worksheet.
Based on Combobox1 selection, Combobox2 loads and based on Combobox2 selection ComboBox3 loads. All from namged ranges which are produced by an SQL query.
So far everything works fine, except the fact, that the last selection of Combobox 2 and Combobox three is still visible after the refresh.
This is confusing for the user, because it looks like a selection has already been made.
After repopulating of the combobox the combobox should show either the first value of the list or nothing.
I tried the following to clear the third Combobox.
Code was executed with Combobox2 change event.
Works all fine, but doing that results in the situation, that the Combobox3 do not show the actual selection anymore.
It always stays empty. After removal of any . Clear method is shows again the selection which was made.
Where is the missing link in my thoughts?
Maybe somebody can bring me back on track. Thanks in advance
Markus
I am facing a logical problem which I am not able to solve.
I have three dependent comboboxes in an worksheet.
Based on Combobox1 selection, Combobox2 loads and based on Combobox2 selection ComboBox3 loads. All from namged ranges which are produced by an SQL query.
So far everything works fine, except the fact, that the last selection of Combobox 2 and Combobox three is still visible after the refresh.
This is confusing for the user, because it looks like a selection has already been made.
After repopulating of the combobox the combobox should show either the first value of the list or nothing.
I tried the following to clear the third Combobox.
Code was executed with Combobox2 change event.
VBA Code:
FamilySelect.Value = Null
FamilySelect.ListIndex = 0
FamilySelect.Value = ""
Works all fine, but doing that results in the situation, that the Combobox3 do not show the actual selection anymore.
It always stays empty. After removal of any . Clear method is shows again the selection which was made.
Where is the missing link in my thoughts?
Code:
Sub MakeSelect_Change()
Call SQL_Size
Sheets(1).OLEObjects("SizeSelect").ListFillRange = "Size"
End Sub
Sub SizeSelect_Change()
Call SQL_Family
Sheets(1).OLEObjects("FamilySelect").ListFillRange = "Family"
End Sub
Sub FamilySelect_Click()
Call Pattern_Dimensions
Call Bolts
Call RefreshPatternName
End Sub
Maybe somebody can bring me back on track. Thanks in advance
Markus