Hello,
I've created a user form that contains a combo box that it populated based off of the items contained in a column within a spreadsheet:
Using the user form, the users will enter data on to the spreadsheet. The selected item determines what row the data will be placed. I used the following to be able to get the row when needed:
This has all worked flawlessly. What I'm now trying to do is allow the users to create a smaller list for the combo box. Currently there are about 150 items that populate the combo box. Not all users need to get to all 150 items regularly, so I'm allowing them to mark their 'Favorites' by placing an 'X' in a designated column. Then when the user form loads they have the option to load just their 'Favorites' or the entire range:
When I had tried doing this without the array in the code above the items would populate the combo box properly, but now the ListIndex that I was using for the GetRowNumber procedure was causing the wrong rows to get filled with the data. I created the array so that I'd be able to have each item's row # from the spreadsheet stored with it's order in the combo box. For example, if the first item in the combo box came from row #3 in the spreadsheet in the array it would be stored as rowNumber(1) = 3.
What I'm trying to accomplish is in later procedures I'd like to be able to get the row number of the item that is selected in the combo box. The problem is I don't know how to recall the information from the array I filled in the earlier procedure. Either that, or if there's a different way to get the cell location of an item from the combo box I loaded in that earlier procedure it would be easier to do that, I'm sure. If I'm making this way too complicated I'd appreciate any assistance to simplify.
Thanks in advance,
Jason
Bookmarks