![]() |
Building a new userform
I am in the process of building a userform to make changes to golf teams.
Right now I have a combobox (TeamsComboBox) that contains a list of 50 golf team names and a blank listbox (TeamListBox) below it. When the user clicks on a name in the combobox I want that team's golfers to show up in the listbox for editting. The names in the list of teams are in A2:A51. A2 is named TEAM1, A3 is named TEAM2, etc. Each team has its own named array that contains their 10 golfers (i.e. TEAM5GOLFERS). I plan to use the cell name of the team selected to concatenate into "TEAM5"&"GOLFERS" to be able to bring the team's golfers (i.e. TEAM5GOLFERS) into the listbox for editing. Am I making any sense? Thanks for any suggestions. -- Jim T |
Building a new userform
Private Sub TeamsComboBox_Click()
With Me .TeamsListBox.RowSource = Worksheets("Sheet1") _ .Range(.TeamsComboBox.Value & "Golfers").Address(, , , True) End With End Sub -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Jim Tibbetts" wrote in message ... I am in the process of building a userform to make changes to golf teams. Right now I have a combobox (TeamsComboBox) that contains a list of 50 golf team names and a blank listbox (TeamListBox) below it. When the user clicks on a name in the combobox I want that team's golfers to show up in the listbox for editting. The names in the list of teams are in A2:A51. A2 is named TEAM1, A3 is named TEAM2, etc. Each team has its own named array that contains their 10 golfers (i.e. TEAM5GOLFERS). I plan to use the cell name of the team selected to concatenate into "TEAM5"&"GOLFERS" to be able to bring the team's golfers (i.e. TEAM5GOLFERS) into the listbox for editing. Am I making any sense? Thanks for any suggestions. -- Jim T |
Building a new userform
That'll work. Thanks Bob.
-- Jim T "Bob Phillips" wrote: Private Sub TeamsComboBox_Click() With Me .TeamsListBox.RowSource = Worksheets("Sheet1") _ .Range(.TeamsComboBox.Value & "Golfers").Address(, , , True) End With End Sub -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Jim Tibbetts" wrote in message ... I am in the process of building a userform to make changes to golf teams. Right now I have a combobox (TeamsComboBox) that contains a list of 50 golf team names and a blank listbox (TeamListBox) below it. When the user clicks on a name in the combobox I want that team's golfers to show up in the listbox for editting. The names in the list of teams are in A2:A51. A2 is named TEAM1, A3 is named TEAM2, etc. Each team has its own named array that contains their 10 golfers (i.e. TEAM5GOLFERS). I plan to use the cell name of the team selected to concatenate into "TEAM5"&"GOLFERS" to be able to bring the team's golfers (i.e. TEAM5GOLFERS) into the listbox for editing. Am I making any sense? Thanks for any suggestions. -- Jim T |
All times are GMT +1. The time now is 01:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com