LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default File Search

Hi,

I use this code to find the last file.
Set fso = New Scripting.FileSystemObject
For Each ThisFile In fso.GetFolder(sICAPPathName).Files
If ThisFile.Name Like "ICAP_FPC*.*" Then
Call GetICAPDate
If LatestFile Is Nothing And dThisFilesDate < dLastFileDate Then
Set LatestFile = ThisFile
dLastUpdated = dThisFilesDate
ElseIf dThisFilesDate dLastUpdated _
And dThisFilesDate < dLastFileDate Then
Set LatestFile = ThisFile
dLastUpdated = dThisFilesDate
End If
End If
Next

I have to use a sub routine to interpret the date as the date can be in
several different formats. I would like to read the files in update order as
this gets them in file name order, how do I change it to do that.

Thanks MarkS

 
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
file search or search files Richad Excel Discussion (Misc queries) 0 October 22nd 09 07:56 PM
Turning a text file name into a search and linking the file as a hyperlink AlistairM Excel Discussion (Misc queries) 1 January 26th 06 04:55 AM
File Search mburkett Excel Programming 2 March 15th 05 01:13 AM
File Search MD Excel Programming 2 August 19th 04 09:28 PM
Macro to search from one file & place on another file. Luong[_2_] Excel Programming 0 May 6th 04 04:53 PM


All times are GMT +1. The time now is 06:13 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"