View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Search acrross Workbboks & Worksheets???

This pseudo code should get you started:

Dim lbox as Listbox
set lbox = Sheet1!Listbox1
for each wkbk in Workbooks
for each ws in wkbk.Worksheets

With ws.cells
Set c = .Find("Target", lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
lbox.AddItem c.Address(0,0,xlA1,True)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Next ws
Next wkbk

--
Regards,
Tom Ogilvy

"Chris" wrote
in message ...
Hi
I hope someone can help me out there.
I need to SEARCH for a string across all open workbooks &
all sheets with in those workbook. Then list the location
of each find in a List Box. Once user select a location
from List it takes them to it.
Is it possible ????
I use XL2002 on Win2K

Thanks a million in advance

Regards
Chris