ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Find All" Function in a UserForm? (https://www.excelbanter.com/excel-programming/345857-find-all-function-userform.html)

Allen Geddes

"Find All" Function in a UserForm?
 
Is it possible to include the Excel "Find All" function in my userform?

Example, the user would type something into a text box, and then click a
"Search" button. The Userform would automatically trigger the Excel "Find
All" function to have it search every worksheet in the workbook. Then, the
UserForm would close, the spreadsheet would become visible, with the "Find
All" dialog box and search results displayed.

Any help is GREATLY appreciated! Thanks

-Allen Geddes

Dave Peterson

"Find All" Function in a UserForm?
 
You can't get to all the options in the Edit|find dialog via VBA.

But you can get to some:
text, in_num, at_num, by_num, dir_num, match_case, match_byte

Maybe you could just show as much as you can and tell the user to do a find all.

Dim WhatToFind As String
WhatToFind = "asdf"
Application.Dialogs(xlDialogFormulaFind).Show arg1:=WhatToFind

=======
Another option (I wouldn't use it) is to try using Sendkeys to choose the
options you want.

Allen Geddes wrote:

Is it possible to include the Excel "Find All" function in my userform?

Example, the user would type something into a text box, and then click a
"Search" button. The Userform would automatically trigger the Excel "Find
All" function to have it search every worksheet in the workbook. Then, the
UserForm would close, the spreadsheet would become visible, with the "Find
All" dialog box and search results displayed.

Any help is GREATLY appreciated! Thanks

-Allen Geddes


--

Dave Peterson


All times are GMT +1. The time now is 08:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com