ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA ".Find" (https://www.excelbanter.com/excel-programming/342643-vba-find.html)

SidBord[_2_]

VBA ".Find"
 
I'm having trouble understanding the VBA ".Find" method. VBA Help hasn't
been much help. I'd like to see a better writeup with examples. Any
suggestions about where to look?

Norman Jones

VBA ".Find"
 
Hi SidBord,

It might help if you explained what specifically it is that you are having
difficulty with.

Perhaps you could turn on the macro recorder while performing find tests of
your own devising. The resultant code might prove instructive.

For a plethora of examples see previous posts in this NG, e,g,:

http://tinyurl.com/869pe


---
Regards,
Norman



"SidBord" wrote in message
...
I'm having trouble understanding the VBA ".Find" method. VBA Help hasn't
been much help. I'd like to see a better writeup with examples. Any
suggestions about where to look?




Rowan Drummond[_3_]

VBA ".Find"
 
Maybe this will help:

Sub findit() 'finds the text "findthis" in column A
Dim fndRange As Range
With Columns(1)
Set fndRange = .Find(what:="findthis", LookIn:=xlValues)
End With
If fndRange Is Nothing Then
MsgBox "Not found"
Else
fndRange.Interior.ColorIndex = 35
End If
End Sub

Regards
Rowan

SidBord wrote:
I'm having trouble understanding the VBA ".Find" method. VBA Help hasn't
been much help. I'd like to see a better writeup with examples. Any
suggestions about where to look?


SidBord[_2_]

VBA ".Find"
 
Thanx, Guys ... great replies, except they don't address my question. I'm
looking for written material of the sort in Help, except useful. I've played
around with the code, but too many questions keep coming up. I really don't
want to keep running to the forum for each question I have. I'd just like to
study it by reading something authoritative on the subject... a good
reference.

"Rowan Drummond" wrote:

Maybe this will help:

Sub findit() 'finds the text "findthis" in column A
Dim fndRange As Range
With Columns(1)
Set fndRange = .Find(what:="findthis", LookIn:=xlValues)
End With
If fndRange Is Nothing Then
MsgBox "Not found"
Else
fndRange.Interior.ColorIndex = 35
End If
End Sub

Regards
Rowan

SidBord wrote:
I'm having trouble understanding the VBA ".Find" method. VBA Help hasn't
been much help. I'd like to see a better writeup with examples. Any
suggestions about where to look?



Dave Peterson

VBA ".Find"
 
Maybe excel's help (not VBA's) for Find.

Hit ctrl-f and then F1.



SidBord wrote:

I'm having trouble understanding the VBA ".Find" method. VBA Help hasn't
been much help. I'd like to see a better writeup with examples. Any
suggestions about where to look?


--

Dave Peterson


All times are GMT +1. The time now is 03:59 PM.

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