Find Function In A Vba Userform

  • Hello Oz gents,


    Is there a way to use the Find function in a userform? What I am looking for is a code that allows me to type a keyword into a textbox of a userform and search the contents of a listbox in the same userform.


    I know it is possible to use the find function in VBA to search a worksheet.
    Can the same be done to search a listbox?


    Thanks,


    Xleary

  • Re: Find Function In A Vba Userform


    I think Find is strictly a worksheet function, but I could be mistaken.


    Why not try it and see what happens--instead of Cells.Find, something like TextBox.Find etc. invoked from the UserForm?


    If it works, let me know, as I'd be curious to find out if it's not limited to that.


    You might also try returning the contents of the listbox to a sheet and then using the Find function.

  • Re: Find Function In A Vba Userform


    Look at the Database Form example in the VBA section [url=www.excel-it.com[/url], it includes a Find function.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!