ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combobox programming (https://www.excelbanter.com/excel-programming/286956-combobox-programming.html)

Christian Reusch

Combobox programming
 
Hi,

I want to do the following:

Table 1 (Configuration):

project1
action1
action2
action3

project2
action6
action7
action8


Table 2:

I want to have two comboboxes. The first should be used to choose one
of the projects. If a project is chosen, the actions of this project
should be in a second combobox.

Is this possible??

Thanks, Christian

Ian Coates

Combobox programming
 
Hi Christian
Make the ListFillRange for combobox 1 reflect the cells containing the
project names then use the following code to select the ListFillRange for
combobox2 depending on the selection in box1

Private Sub ComboBox1_Change()
If ComboBox1.Text = "project 1" Then
ComboBox2.ListFillRange = "j1:j3"
ComboBox2.Text = ""
Else
If ComboBox1.Text = "project 2" Then
ComboBox2.ListFillRange = "k1:k3"
ComboBox2.Text = ""
Else: ComboBox2.Text = "Select project first"
End If
End If
End Sub

Hope this helps

Ian

"Christian Reusch" wrote in message
om...
Hi,

I want to do the following:

Table 1 (Configuration):

project1
action1
action2
action3

project2
action6
action7
action8


Table 2:

I want to have two comboboxes. The first should be used to choose one
of the projects. If a project is chosen, the actions of this project
should be in a second combobox.

Is this possible??

Thanks, Christian




Bob Phillips[_6_]

Combobox programming
 
Christian,

I have a workbook example of how to achieve this sort of dependent combobox.

Mail me if you want a copy.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Christian Reusch" wrote in message
om...
Hi,

I want to do the following:

Table 1 (Configuration):

project1
action1
action2
action3

project2
action6
action7
action8


Table 2:

I want to have two comboboxes. The first should be used to choose one
of the projects. If a project is chosen, the actions of this project
should be in a second combobox.

Is this possible??

Thanks, Christian





All times are GMT +1. The time now is 07:30 PM.

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