Find Text in List Box

J

JamesJ

I've looked hi and lo for code to find text in a List Box using
the Find input box in AC 2007. Finding text in the form works
ok but finding it in a List Box doesn't seem to work.
Can anyone point me to a web site or let me know what code I might need
to accomplish this?

Thanks,
James
 
R

Rod Plastow

Hi James,

List and combo boxes are objects (controls) that have row and column
properties. You need to find or write a routine that visits each column of
each row in turn and tests for your search string.

It seems to me this is a classic case for using VBA's OOP functionality.
Design a class ListBoxSearch or some such with all the functionality you need
and when you encounter a List Box instantiate a ListBoxSearch object
referencing your List Box.

Rod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top