Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks to Bob Phillips and Ivan for their help with picking up a file
with a date tag using code. (For some reason the listing has now disappeared) I need to go a step further, I need the latest created file to be opened. The code below shows how far I Have got: Dim wb As Workbook sPath = Application.DefaultFilePath & "\" & sFile sfilename = "My File*.xls" If Len(Dir(sPath & "\" & sfilename)) = 0 Then MsgBox "No file" Else sfilename = sPath & "\" & Dir(sPath & "\" & sfilename) Set wb = Workbooks.Open(sfilename) End If All the workbooks start with 'My File' and end with different dates & times, and at the moment it only picks up the oldest file. Again - any help greatly appreciated John |
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 |