Edit/Find

T

Tommi

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
 
C

Chip Pearson

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 (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top