I am not sure if I am following what you are trying to do but something to try would be to have the first first combobox populate in the activate subroutine for your form. Then create a sub for the on change event for the first combobox it would look something like this:
private sub combobox1_change()
if not isnull(combobox1.value) then
select case combobox1.value
case 1
combobox2.additem ()
'logic to populate based on first option in combobox1
case 2
combobox2.additem ()
' logic to populate based on first option in combobox1
case else
' default logic
end select
combobox2.visible = true
end if
end sub
You can continue with this same logic down through however many comboboxes you need. One obvious application that I can see would be have a list box display the sheets in a workbook, then the next contains two columns, one being the column headings of the selected worksheet, and the second column being the actual column number. Once a value is selected in the second box a third box could give you the specific records in that column.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.