Hi,
I have a small application which reads the contents of a spreadsheet and then writes the contents of each row to a listbox. The listbox has 5 columns.
I have dropdown boxes in the application that I wish to use in order to filter what gets displayed in the Listbox. For example, one column of data in the Listbox will only include the values "Yes" or "No" and I have a drop down box which is used to select Yes or No. If "Yes is selected I only want the rows which contain "Yes" to be displayed in the Listbox.
The code snippet which I use to populate the list box is shown below
Please can someone advise how I can achieve displaying filtered rows please?
Thank you
I have a small application which reads the contents of a spreadsheet and then writes the contents of each row to a listbox. The listbox has 5 columns.
I have dropdown boxes in the application that I wish to use in order to filter what gets displayed in the Listbox. For example, one column of data in the Listbox will only include the values "Yes" or "No" and I have a drop down box which is used to select Yes or No. If "Yes is selected I only want the rows which contain "Yes" to be displayed in the Listbox.
The code snippet which I use to populate the list box is shown below
HTML:
For i = 1 To LastUsedRowNewStock - 1 ListBox1.AddItem newStockListArray(i, 2) 'Serial number ListBox1.List(i - 1, 1) = newStockListArray(i, 3) 'Type ListBox1.List(i - 1, 2) = newStockListArray(i, 5) 'DC switch Yes or No ListBox1.List(i - 1, 3) = newStockListArray(i, 4) 'Communication ListBox1.List(i - 1, 4) = newStockListArray(i, 1) 'Pallet number Next
Please can someone advise how I can achieve displaying filtered rows please?
Thank you