Value find Dialog Box Macro

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
I have been using a code that pulls up the ctrl + F dialog box

Application.Dialogs(xlDialogFormulaFind).Show

How can I do this so the Find box looks for Values not Formulas, I thought it would be as simple as typing

Application.Dialogs(xlDialogValueFind).Show

but this option does not exist ?

Any ideas please
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Many thanks for that info

I have now used this code

Private Sub Find()

'

' Macro recorded 30/04/2007 by paulhai

Columns("A:A").Select


Application.Dialogs(xlDialogFormulaFind).Show "", 2


End Sub



I need to search within column A only, I thought this would work...but it doesn't it still searches across the sheet, where have i gone wrong ??
 
Upvote 0
NOTE:
We are assuming you do not want to use the FINDmethod, but you want to get the findbox itself on your display.

this time I cannot get wiser using the helpfiles (which is an exception !!)
this is the result of my experiments
browse the internet for more
if you find usefull links, perhaps I could help more
Code:
Private Sub Find()

Columns("A:A").Select

Application.Dialogs(xlDialogFormulaFind).Show "123", 2, 2, 1
'arg1 = text to find
'arg2 = formulas (1) or values (2)
'arg3 = whole cells (1) or part (2)
'arg4 = searchdirection: column (1) or row (2)
'arguments
'text, in_num, at_num, by_num, dir_num, match_case, match_byte

'arguments for FIND
'see if there are "parallel" arguments ??
'What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte, SearchFormat)

End Sub
I'll call some guys
EDIT: I did
 
Upvote 0
German, French, Dutch, Italian, English :eek: o, my eyes :cry: I've been all over the world ... this is the result of another 30 minutes on the web
Code:
Private Sub FindBox()

Columns("A:A").Select

Application.Dialogs(xlDialogFormulaFind).Show "123", 2, 2, xlByRows, xlNext, True ',True
'arg1   text        What            text to find
'arg2   in_num      LookIn          formulas (1) or values (2) or comments (3)
'arg3   at_num      LookAt          whole cells (1 or xlWhole) or part (2 or xlPart)
'arg4   by_num      SearchOrder     xlByRows  (1) or xlByColumns (2)
'arg5   dir_num     SearchDirection xlNext (1) or xlPrevious (2)
'arg6   match_case  MatchCase       True or False
'arg7   match_byte  MatchByte       True or False

End Sub

I noticed the following differences
1. DialogBoxes are not exactly the same (code-Dialog has no listbox for worksheet or workbook, no replaceoption, ...)
2. Behaviour: selection has no influence when using code

weird: after executing code, Excel is instable when doing Control+F
 
Upvote 0
Thanks Erik, your second code caused my excel to crash, the first, like mine, worked by selecting column A but just does not search within columm A, if i did it manually it does. I tried to record the macro but this doesn't work, how strange ??
 
Upvote 0
Do you hate too when projects get unstable?
I got an answer from tusharm. He's more years of experience. Also pointed out that the boxes are different, that it was unstable ...

this is another approach
Code:
Sub FindIt()
Application.CommandBars.FindControl(ID:=1849).Execute
Application.SendKeys "{TAB}{TAB}{TAB}{TAB}{UP}{UP}{UP}{DOWN}{ENTER}"
End Sub
tabbing to "formulas/values/comments"
3 times arrow up to be sure "formulas" is selected
1 time "down" to select the values

the 4 tabs could be replaced by the correct "ALt + key", but that would be "language"sensitive. (for me it is tab+k)

little problem:
I also hate SendKeys :)
but in this case, should be a very good alternative

best regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top