moving through items in listboxes

  • Thread starter Thread starter revduke123
  • Start date Start date
R

revduke123

HI all,

I'm using Office 2004, and trying to use a listbox to enable user to
choose an item - in this case, a filename from a list of filenames.
The code is below.
The form opens up fine, the list of files appears fine, you can use
the up/down arrows to select items; but I can't get the 'matching'
feature to work. As soon as you press any other key, the selection
jumps to the top of list. I want the selection to jump to the first
occurrence of the phrase tha the user types in, using the 'complete
match' process

Any ideas what I'm doing wrong?
Thanks for any help.
Revduke

Sub testuserform()

dirlist ' this sub sticks a directory listing into a string array
called file_names
BubbleSort (file_names) 'now I sort it
Load UserForm1
UserForm1.ListBox1.MatchEntry = fmMatchEntryComplete
UserForm1.ListBox1.ColumnCount = 1
UserForm1.ListBox1.List() = file_names
UserForm1.ListBox1.TextColumn = 1
UserForm1.Show
End Sub
 
This section of the bleachers is mostly for the Windows team, though there's no
signage to warn you of that.

No worries. I've replied in the Mac section where you also posted the same
question. Let's follow up there.
 
Back
Top