LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default file conversion

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
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
File Conversion tjorgens Excel Discussion (Misc queries) 1 September 29th 09 05:27 PM
File conversion Dasco New Users to Excel 1 July 12th 08 09:10 AM
AppleWorks file conversion to Excel file Don merkel Excel Discussion (Misc queries) 0 February 1st 08 07:27 AM
old xls file conversion Denise1 Setting up and Configuration of Excel 3 January 31st 06 03:02 AM
.csv file conversion Amber_D_Laws[_34_] Excel Programming 9 January 26th 06 02:29 PM


All times are GMT +1. The time now is 12:40 PM.

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"