Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See if you can get started with something like this...
Mark Sub test() Dim fs As Variant Dim fn As Variant Dim dtc As Variant Dim strPath As String Dim strFile As String strPath = "C:" ' set directory as needed strPath = strPath & "\" ' add backslash to path ' strFile will contain the path and the starting ' filename you were wanting to target strFile = Dir(strPath & "GEN_UNIEK_CNTRMAN_2008*") Do While strFile < "" Set fs = CreateObject("Scripting.FileSystemObject") Set fn = fs.GetFile(strPath & strFile) ' you can play around with the format used in the ' dtc value. this value will represent the date ' and time of creation for each file you have in ' the assigned directory and for the given starting ' filename. ' I personally would feed these values into some ' type of an array and then run a sort on it to ' get it in some type of logical order. but that ' is totally up to you. the format I used is very ' similar to that used with database administrative ' analysis. this format will allow for an easy ' mathematical sort. ' the format used here is (yyyymmddhhmmss): ' yyyy = year ' mm = month ' dd = date ' hh = hour ' mm = minute ' ss = second dtc = Format(fn.DateCreated, "yyyymmddhhmmss") ' your code would go in here strFile = Dir Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File Conversion | Excel Discussion (Misc queries) | |||
File conversion | New Users to Excel | |||
AppleWorks file conversion to Excel file | Excel Discussion (Misc queries) | |||
old xls file conversion | Setting up and Configuration of Excel | |||
.csv file conversion | Excel Programming |