Re : Making use of the Built-in Dialog Boxes
Use the FIND method...look in Help. There are some very
good code examples therein.
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <
firstAddress
End If
End With
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
1. Please examine the following code :-
Dim TextFind As String
Call Application.Dialogs(xlDialogFormulaFind).Show
(TextFind, 2, 2, 1,
0, True, True)
MsgBox "TextFind = " & TextFind
2. It is in vain to store the text string (entered into
the Find What
: text box of the built-in xlDialogFormulaFind) by using
the argument
TextFind.
3. Please show the alternative means of capturing
TextFind by using
VBA code.
4. Regards.
.
|