Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Searching several items from one document to another | Excel Worksheet Functions | |||
Running mutiple excel sheets on mutiple computers | Excel Discussion (Misc queries) | |||
Searching for different items | Excel Discussion (Misc queries) | |||
Opening mutiple files at once - WorkSpace | New Users to Excel | |||
How can I use replace(alt+H) for mutiple items needing replace | Excel Worksheet Functions |