Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

VBA Excel Error 424 search textbox to display listbox, error display listbox header

$
0
0

I am trying to create a userform to search for a person in a 10000 entry excel, using any of the NO, Firstname, lastname, username or email column.

I can search. However, when the listbox displays the data, it only displays the first column, and not any of the other 4 columns.

Thank you.

Private Sub SearchCommand_Click()

Me.ResultListbox.AddItem

For a = 1 To 5

Me.ResultListbox.List(0, a - 1) = Sheet1.Cells(1, a)
Next a
Me.ResultListbox.Selected(0) = True
End sub

enter image description here


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>