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: 1
Default Need to get modified date


I have some code that searches files with specific contents within the
file and returns the file name to a selection box. The selection box
currently contains the file name. I am needing it to also include the
modified date within this box. Here is the code i'm currently using.
Can any help me with getting the modified date added in as part of the
information provided. Thank you,
Michael

Sub Locatefile()


Dim I As Integer
Worksheets("Data").Select
Cells.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("A1").Select
5 si = Worksheets("Setup").Range("C4")
Path = Worksheets("Setup").Range("F3")
With Application.FileSearch
..NewSearch
..LookIn = Path
..TextOrProperty = "COST CENTER = " & si
..MatchTextExactly = True
..Filename = "*.txt"
..Execute


If .FoundFiles.Count = 0 Then GoTo 5
For I = 1 To .FoundFiles.Count
If .FoundFiles.Count = 1 Then
Workbooks.Open .FoundFiles(I)
End If
If .FoundFiles.Count 1 Then
UserForm1.ComboBox1.AddItem .FoundFiles(I)
End If

Next

End With
UserForm1.Show
foundfileopen
End Sub


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile: http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=557334

 
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
Date Last Modified Emma Hope Excel Worksheet Functions 3 July 19th 06 09:06 PM
Last Modified Date help... vmadan16 Excel Programming 0 June 22nd 06 12:40 PM
date that a row is modified vaderj Excel Discussion (Misc queries) 1 April 24th 06 10:59 PM
date modified flow23 Excel Discussion (Misc queries) 1 November 24th 05 12:25 PM
modified date ceemo[_41_] Excel Programming 1 October 29th 05 06:20 PM


All times are GMT +1. The time now is 07:07 AM.

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"