Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
SJ SJ is offline
external usenet poster
 
Posts: 22
Default Folder search

At present to search for a date within my workbook I use the following code,

Sub myfind()
Dim Message, Title, Default, SearchString
Message = "Enter date as ( d-* or dd-* )" ' Set prompt.
Title = "Select Day " ' Set title.
Default = "dd-mmm-yy" ' Set default.
' Display message, title, and default value.
SearchString = InputBox(Message, Title, Default)

'SearchString = "Rob"
Set S = Sheets.Application
For Each S In Application.Sheets

With S.Range("A1:IV65536")
Set F = .find(SearchString, MatchCase:=False, LookAt:=xlPart,
LookIn:=xlValues)
If F Is Nothing Then
Else
Location = F.Address
S.Select
Range(Location).Select
Exit For
End If
End With
Next S
End Sub


What I want to do is to be able to apply this to searching a folder and it's
subfolders for a date within the books in the folders. The date I will be
searching for will only ever exist once in the folders. Is there a way I can
search the folders for a date that exists in a cell on each spreadsheet
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search a folder? JCW New Users to Excel 2 July 8th 09 07:26 PM
Microsoft Search opens when I click on a file folder tedster Setting up and Configuration of Excel 1 December 10th 08 06:20 PM
search folder/directory for a phrase inside excel files pwrichcreek Excel Discussion (Misc queries) 5 August 11th 08 09:39 PM
Can Excel search for workbook data in a Windows folder? B Diggity Excel Discussion (Misc queries) 1 October 25th 07 10:24 PM
Import Folder Search Results in a spreadsheet? Mark B Excel Discussion (Misc queries) 1 April 9th 05 05:17 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"