ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need to get modified date (https://www.excelbanter.com/excel-programming/365955-need-get-modified-date.html)

Michael Wise[_35_]

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


Michael Wise[_36_]

Need to get modified date
 

Any Suggestions?


--
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


Michael Wise[_37_]

Need to get modified date
 

Bump Bee Bump:eek

--
Michael Wis
-----------------------------------------------------------------------
Michael Wise's Profile: http://www.excelforum.com/member.php...nfo&userid=699
View this thread: http://www.excelforum.com/showthread.php?threadid=55733



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com