I am using the code below to open txt files. But prior to importing I would like to format them as comma delimited. What would the code be to accomplish this before actually opening the workbook?
Sub OpenMultipleFiles()
Dim fn As Variant, f As Integer
fn = Application.GetOpenFilename("Excel-files,*.xls", _
1, "Select One Or More Files To Open", , True)
If TypeName(fn) = "Boolean" Then Exit Sub
For f = 1 To UBound(fn)
Workbooks.Open fn(f)
Next f
End Sub
Always include link to your same question on other forums when you post on multiple forums. It's courteous, and around here it's the law.
Crossposted:
http://www.mrexcel.com/forum/showthread.php?t=506223
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks