Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Searching for mutiple items in txt files

I am searching a virtual printer for txt files with specific informatio
in them. I would however like for it to search for today's date as on
of 3 criteria's. Current code below is what i'm using but I have no
found a solution to getting it to see the date. FYI the report wil
contain the date as such 16-AUG-04 in txt. Any help here?

With Application.FileSearch
.NewSearch
.LookIn = "X:"
.TextOrProperty = "U246984 PCE REPORT"
.MatchTextExactly = False
.Filename = "*.txt"
.Execut

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Searching for mutiple items in txt files

I looked through help. I didn't see anything that said you get up to 3
criteria. Did I miss something?

..textorproperty = format(date,"dd-mmm-yy")

might work for you.

The other thing is that if your date is in a cell, and it's just formatted to
show dd-mmm-yy, it might not work at all.

I'd be very surprised to see filesearch find a date this way.

But if you actually had text in the cell '16-AUG-04
note leading apostrophe, then I bet it would work ok.

(all this is untested.)

"Michael Wise <" wrote:

I am searching a virtual printer for txt files with specific information
in them. I would however like for it to search for today's date as one
of 3 criteria's. Current code below is what i'm using but I have not
found a solution to getting it to see the date. FYI the report will
contain the date as such 16-AUG-04 in txt. Any help here?

With Application.FileSearch
NewSearch
LookIn = "X:"
TextOrProperty = "U246984 PCE REPORT"
MatchTextExactly = False
Filename = "*.txt"
Execute

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Searching for mutiple items in txt files

Thanks Dave,
But I have tried the format(dd-mmm-yy) did not work it caused it t
bypass all together. The file it is searching is still in text form an
so the date represented within that files date is formated dd-mmm-yy.
have even tried assigning a variable as well did not work there either


Other suggestions?

Michae

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Searching for mutiple items in txt files

If you do file|open, you can click on search (it's under Tools in xl2002).

Maybe you could search there and see if that helps. But if I put 08/19/2004 in
a cell (formatted for dd-mmm-yy) and then search for 19-aug-04, it didn't find
it.

Maybe you could search for the same format as your pc's short date format.

If you're not tied to VBA, maybe you could use Windows start button|search to
find it.



"Michael Wise <" wrote:

Thanks Dave,
But I have tried the format(dd-mmm-yy) did not work it caused it to
bypass all together. The file it is searching is still in text form and
so the date represented within that files date is formated dd-mmm-yy. I
have even tried assigning a variable as well did not work there either.

Other suggestions?

Michael

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

Reply
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
Searching several items from one document to another REBANEEDSTOKNOW Excel Worksheet Functions 3 July 25th 09 08:20 PM
Running mutiple excel sheets on mutiple computers Lost Excel Discussion (Misc queries) 3 January 16th 09 12:32 AM
Searching for different items B_cooper123[_2_] Excel Discussion (Misc queries) 1 April 23rd 08 04:29 PM
Opening mutiple files at once - WorkSpace Mark S New Users to Excel 3 February 14th 07 12:12 PM
How can I use replace(alt+H) for mutiple items needing replace Gery Excel Worksheet Functions 1 June 15th 05 05:51 PM


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

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

About Us

"It's about Microsoft Excel"