PDA

View Full Version : Search workbook as you type



joms
10-20-2011, 08:40 PM
hi guys, is it possible to achieve in VBA to have a small textbox in a form, in which user will type something and it will search the workbook while the user is typing.

If possible, appreciate if can give an idea on how to start.

Thanks in advance. :)

mikerickson
10-20-2011, 10:37 PM
What do you mean "search" while typing?
Search for what and do what if it is found?
Are there particular sheets or ranges that should be searched?

joms
10-20-2011, 10:58 PM
hi mikerickson, what i'm planning is to have a textbox in which user can type.

Then while typing it will search or will try to find for exact match that the user is typing on the textbox for any values on the entire workbook.

If found a match it will highlight the particular value.

Search for what and do what if it is found?
- Search for a value that is being type on the textbox.
- If found highlight the said value.

Are there particular sheets or ranges that should be searched?
- All sheets.

Actually, there's a built-in function of excel to find or search for a particular value on the entire workbook.
and if there are multiple results, it will display which worksheet and which particular row and column. But for this you have to click "Find Now" for the results to view.

but what i want is like an interactive search, while the user is typing for a particular value then excel will search as well for any exact match.

Thanks for your reply.

mikerickson
10-21-2011, 05:33 PM
There is seldom any advantage to duplicating Excel's built in funcitonality.
What do you have so far in the way of a userform and code?