Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 4th, 2005, 04:14 AM
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default file search method

From what i understand about File Search, the program will pick out the file name that contains the word/phase. However, what if all the files contain the same word/phase?

An example of different file names:
(1) "happy_work_009"
(2) "happy_tuesday_work_001"
(3) "happy_monday_work_001"
(4) "wednesday_work_005"

So basically, I want to retrieve all files that contains just the word "happy"? How do i search for a file in a directory?

And also, how do i condition the file search not to go thru the files whose size are 0kb and also to retrieve file from a period of time using msoConditionAnytimeBetween property??

Im using the vba to write the codings out. need urgent help please?

coding:

fs = application.filesearch
fs.newsearch
fs.lookin = directory
fs.filename = variable & "??????????????.dat"
With fs.PropertyTests
        .Add Name:="Last Modified", Condition:=msoConditionAnytimeBetween, _
             Value:=Format(dt1, "dd MMM yyyy"), _
             SecondValue:=Format(dt2, "dd MMM yyyy")
end with
fs.execute

Best Regards,
Farina =P
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload file method kingvn2005 ASP.NET 2.0 Professional 1 August 21st, 2007 05:06 AM
File Search / Indexing Search with .net 2.0 maulik77 ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2007 12:45 AM
Upload a file with a webservice method. chriskeeble .NET Web Services 2 March 14th, 2005 10:42 AM
best search method stoneman Access 2 September 4th, 2003 01:04 PM



All times are GMT -4. The time now is 09:01 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.