Is it possible to import multiple fixed with files at once? I can make the following work, but I do not know how to allow the user to search for a file.
Sub OpenTextFile()
Const xlFixedWidth = 2
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.OpenText _
"C:\Users\Kate\Desktop\Test.txt", , , xlFixedWidth, , , , , , , , , Array(Array(0, 1), Array(4, 1), Array(9, 1), Array(23, 1), Array(30, 1), Array(33, 1), Array(42, 1), Array(48, 1), Array(51, 1), Array(54, 1), Array(64, 1), Array(70, 1), Array(80, 1))
End Sub
Thank you so much!
Sub OpenTextFile()
Const xlFixedWidth = 2
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com




Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.OpenText _
"C:\Users\Kate\Desktop\Test.txt", , , xlFixedWidth, , , , , , , , , Array(Array(0, 1), Array(4, 1), Array(9, 1), Array(23, 1), Array(30, 1), Array(33, 1), Array(42, 1), Array(48, 1), Array(51, 1), Array(54, 1), Array(64, 1), Array(70, 1), Array(80, 1))
End Sub
Thank you so much!