Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great it works
Many thanks colofnature Also thanks to Tom - I will try yours later Must leave now......... "" wrote: Replace the line Set wb = Workbooks.Open(sfilename) with the following: sfilename = sPath & "\" & Dir(sPath & "\" & sfilename) NewestFileName = sfilename FileDate = FileDateTime(sfilename) Do While Len(sfilename) Len(sPath & "\") If FileDateTime(sfilename) FileDate Then NewestFileName = sfilename FileDate = FileDateTime(sfilename) End If sfilename = sPath & "\" & Dir() Loop Set wb = Workbooks.Open(NewestFileName) I haven't tested it, but it ought to work... :) Col -- colofnature ------------------------------------------------------------------------ colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356 View this thread: http://www.excelforum.com/showthread...hreadid=544793 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a file with date extension | Excel Programming | |||
Opening file saved as current date | Excel Programming | |||
switched date format opening dbf file | Excel Programming | |||
Date format when opening a .CSV file programmatically | Excel Programming | |||
Opening CSV file causes date differences | Excel Programming |