Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go To combobox
Hi,
I have inserted a combobox on a worksheet that I want to act as a record selector for showing one record from my list of 500+ entries. Trouble is I have no idea how to write a code to achieve this. Any help or sample odes would be appreciated. Regards gregork |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go To combobox
Grgeor,
From previous posts I will assume an activeX control. You need to identify a key column, lets say B. Set the ListFillrange property for the cells in column B, and then use the .ListIndex property on a combobox click event to identify which record (it will equate to the row - 1). -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Hi, I have inserted a combobox on a worksheet that I want to act as a record selector for showing one record from my list of 500+ entries. Trouble is I have no idea how to write a code to achieve this. Any help or sample odes would be appreciated. Regards gregork |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go To combobox
Thanks Bob. I've managed to set the ListFillrange property successfully and
my combobox now displays a list of all the records in A3:A500 but I am afraid you lost me on the code for the click event. Could you be more specific I have no idea how to write a code to make the cell I selected in the combobox be the go to cell . I guess I would need to make the cell selected highlighted or maybe just have the cursor go to the cell. Many Thanks gregork "Bob Phillips" wrote in message ... Grgeor, From previous posts I will assume an activeX control. You need to identify a key column, lets say B. Set the ListFillrange property for the cells in column B, and then use the .ListIndex property on a combobox click event to identify which record (it will equate to the row - 1). -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Hi, I have inserted a combobox on a worksheet that I want to act as a record selector for showing one record from my list of 500+ entries. Trouble is I have no idea how to write a code to achieve this. Any help or sample odes would be appreciated. Regards gregork |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go To combobox
Gregor,
Let's assume that the records are in the range H1:M500. The click event would look like this Private Sub ComboBox1_Click() Range("H1:M500")(ComboBox1.ListIndex + 1, 1).Select End Sub It would be better to name the range and use that of course. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Thanks Bob. I've managed to set the ListFillrange property successfully and my combobox now displays a list of all the records in A3:A500 but I am afraid you lost me on the code for the click event. Could you be more specific I have no idea how to write a code to make the cell I selected in the combobox be the go to cell . I guess I would need to make the cell selected highlighted or maybe just have the cursor go to the cell. Many Thanks gregork "Bob Phillips" wrote in message ... Grgeor, From previous posts I will assume an activeX control. You need to identify a key column, lets say B. Set the ListFillrange property for the cells in column B, and then use the .ListIndex property on a combobox click event to identify which record (it will equate to the row - 1). -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Hi, I have inserted a combobox on a worksheet that I want to act as a record selector for showing one record from my list of 500+ entries. Trouble is I have no idea how to write a code to achieve this. Any help or sample odes would be appreciated. Regards gregork |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go To combobox
Thanks for spelling it out for me Bob.
Kind Regards gregork "Bob Phillips" wrote in message ... Gregor, Let's assume that the records are in the range H1:M500. The click event would look like this Private Sub ComboBox1_Click() Range("H1:M500")(ComboBox1.ListIndex + 1, 1).Select End Sub It would be better to name the range and use that of course. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Thanks Bob. I've managed to set the ListFillrange property successfully and my combobox now displays a list of all the records in A3:A500 but I am afraid you lost me on the code for the click event. Could you be more specific I have no idea how to write a code to make the cell I selected in the combobox be the go to cell . I guess I would need to make the cell selected highlighted or maybe just have the cursor go to the cell. Many Thanks gregork "Bob Phillips" wrote in message ... Grgeor, From previous posts I will assume an activeX control. You need to identify a key column, lets say B. Set the ListFillrange property for the cells in column B, and then use the .ListIndex property on a combobox click event to identify which record (it will equate to the row - 1). -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "gregork" wrote in message ... Hi, I have inserted a combobox on a worksheet that I want to act as a record selector for showing one record from my list of 500+ entries. Trouble is I have no idea how to write a code to achieve this. Any help or sample odes would be appreciated. Regards gregork |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Combobox | Excel Discussion (Misc queries) | |||
comboBox | Excel Programming | |||
Combobox | Excel Programming | |||
combobox | Excel Programming |