hi... i created a form in VB 6.5 which has a list box. i want to populate this listbox with a 2 column table created in another worksheet (Sheet1) but same workbook so I can sort the data easily. currently, the data is inputted manually within the code ex:
Private Sub UserForm_Initialize()
Dim Resource_Name As Variant
Resource_Name = VBA.Array("25C092", "33B002", "33B003", "33B004", "33B005", "33B005B01", "33B006", "33B006F01", "33B006F02", "33B006G01", "33B006G02", "33B006G03", "33B007", "33B007A02", "33B009",.......)
This makes it hard to find specific a specific number. I want to be able to show both the number and associated name, sort the data numerically or alphabetically and add rows when needed within Sheet1.
Current VBA.Array only shows numbers, not associated name.
I tried to Set RowSource on form to Sheet1 and the range. Listbox was populated just as I wanted, but query would not work. Currently when user chooses a number from listbox on form, it queries from an sql db.
Any help is much appreciated. Thanks!
Private Sub UserForm_Initialize()
Dim Resource_Name As Variant
Resource_Name = VBA.Array("25C092", "33B002", "33B003", "33B004", "33B005", "33B005B01", "33B006", "33B006F01", "33B006F02", "33B006G01", "33B006G02", "33B006G03", "33B007", "33B007A02", "33B009",.......)
This makes it hard to find specific a specific number. I want to be able to show both the number and associated name, sort the data numerically or alphabetically and add rows when needed within Sheet1.
Current VBA.Array only shows numbers, not associated name.
I tried to Set RowSource on form to Sheet1 and the range. Listbox was populated just as I wanted, but query would not work. Currently when user chooses a number from listbox on form, it queries from an sql db.
Any help is much appreciated. Thanks!