ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Edit/Find (https://www.excelbanter.com/excel-programming/281662-edit-find.html)

Tommi[_2_]

Edit/Find
 
Hello!
How to use Excel's Edit/Find -command form VBA?
I recorded a macro using it, but the macro didn't record anything relating
to Edit/Find.

Thanks for your help!

BR,
Tommi



Chip Pearson

Edit/Find
 
Tommi,

Try something like

Dim FoundCell As Range
Set FoundCell = Cells.Find(what:="whatever", LookIn:=xlValues, _
lookat:=xlWhole, MatchCase:=False)
If FoundCell Is Nothing Then
MsgBox "Not found"
Else
MsgBox "Found in cell: " & FoundCell.Address
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Tommi" wrote in message
...
Hello!
How to use Excel's Edit/Find -command form VBA?
I recorded a macro using it, but the macro didn't record anything relating
to Edit/Find.

Thanks for your help!

BR,
Tommi






All times are GMT +1. The time now is 10:34 PM.

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