View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Find a value in a workbook VBA

Something like this should be close...

Sub FindStuff()
Dim rngFound As Range
Dim wks As Worksheet

For Each wks In Worksheets
Set rngFound = wks.Cells.Find(What:="Tada", _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
MatchCase:=False)
If Not rngFound Is Nothing Then Exit For
Next wks

If rngFound Is Nothing Then
MsgBox "Not Found"
Else
rngFound.Parent.Select
rngFound.Select
End If
End Sub
--
HTH...

Jim Thomlinson


"jlclyde" wrote:

I am having trouble using find to locate a string in a workbook. I
want to be abel to find the value anywhere in the workbook. It will
only be listed once.

Any help will be greatly appreciated,
Jay
.