hi
my userform3 has textbox and a listbox as i enter number in textbox it populates listbox but not with highlighted rows though,think it has something to do with range but have tried many changes and can not get right,any ideas please
cheers colin
hi
my userform3 has textbox and a listbox as i enter number in textbox it populates listbox but not with highlighted rows though,think it has something to do with range but have tried many changes and can not get right,any ideas please
cheers colin
Last edited by cfinch100; 04-05-2013 at 10:05 AM.
Colin
Where are you trying to populate the listbox from? It appears to be a range with only 3 cells, A3, C3 and E3.
By the way, have you considered using a combobox instead of a textbox?
It could list all the unique codes/IDs/things, whatever it is that the user is mean to enter.
The reason I suggest that is because the textbox change event is triggered after every keystroke.
So, for example, if I enter ST0200 the code will have been executed 5 times before I've entered in the full code.
With a combobox you can add code to see if the user has selected or typed a value on the list, and if they have run the code to populate the listbox.
If posting code please use code tags, see here.
hi norie
combobox sounds the way to go ,i am trying to populate the listbox from sheet4 but only the highlighted entries , so if i enter st0200 it populates those entries
or st0199 it does those ,hope this helps
cheers colin
Colin
Here you go, this replaces all the code for UserForm3.
It's not quite complete as I've not added code to set the widths of the columns in the listbox, I just set it's ColumnCount to 3.
PS I've also used something kind of new, to me anyway, to find the rows matching the selected ID. It seems to have worked, but the code can always![]()
Please Login or Register to view this content.
be changed back to use another method.
hi nny thanks
colinorie
thanks for this,it only pops first colomn in listbox but will have play with it and see how i get on, ma
The code is there to populate the other columns.
Did you change the ColumnCount of the listbox like I did?
hi norie
excellent as always many thanks for that will populate later with extra colomns
cheers colin
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks