ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find/Find ALL (https://www.excelbanter.com/excel-programming/437937-find-find-all.html)

Dan Tabla[_2_]

Find/Find ALL
 
Does any one, please, know how to call the method that brings up the "Find
and Replace" form under the menu Edit/Find/Find ALL? (Record macro didnt help
me)

Thank you so much and Happy New Year!

OssieMac

Find/Find ALL
 
Hi Dan,

To the best of my knowledge you cannot use Find all in VBA. You have to use
Find followed by Find Next in a loop. Help has an example of find and find
next if you search for 'Find Next'. However, use all of the find parameters
that you get when recording a macro with find. Reason is that Excel remembers
the parameters last used whether in the interactive mode or in VBA so for
good programming reset them in the code.

Not sure just what you want to do when you have found all occurrences so if
you still need additional help then if you post a bit more info then I am
sure you will get the help you need.

--
Regards,

OssieMac


"Dan Tabla" wrote:

Does any one, please, know how to call the method that brings up the "Find
and Replace" form under the menu Edit/Find/Find ALL? (Record macro didnt help
me)

Thank you so much and Happy New Year!


joel[_467_]

Find/Find ALL
 

Try dialogs either the find or replace below. Sues arg1,arg2,arg3 ...
to pass the parameters to the dialog. The parameter lists is shown
below along with the code.

'Parameter list for Find
'xlDialogFormulaFind Text, in_num, at_num, by_num, dir_num,
'match_case, 'match_byte

'Parameter list for replace
'xlDialogFormulaReplace find_text, replace_text, look_at, look_by,
active_cell,
'match_case, match_byte

Set FindDialog = Application.Dialogs(xlDialogFormulaFind)

With FindDialog
.Show arg1:="abc"
End With


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=166386

Microsoft Office Help


Dan Tabla[_2_]

Find/Find ALL
 


"OssieMac" wrote:

Hi Dan,

To the best of my knowledge you cannot use Find all in VBA. You have to use
Find followed by Find Next in a loop. Help has an example of find and find
next if you search for 'Find Next'. However, use all of the find parameters
that you get when recording a macro with find. Reason is that Excel remembers
the parameters last used whether in the interactive mode or in VBA so for
good programming reset them in the code.

Not sure just what you want to do when you have found all occurrences so if
you still need additional help then if you post a bit more info then I am
sure you will get the help you need.

--
Regards,

OssieMac


"Dan Tabla" wrote:

Does any one, please, know how to call the method that brings up the "Find
and Replace" form under the menu Edit/Find/Find ALL? (Record macro didnt help
me)

Thank you so much and Happy New Year!



All times are GMT +1. The time now is 09:01 PM.

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