Hello, I have tried lots of things but, no luck.
I want a macro to insert, lots of txt files into an xls.
Some files on the same sheet, some not.
Each value on diferent cell
I can't figure out how to put each txt where I want it.
etc 1.txt at cell C5, 2.txt at k5 and 3.txt at O5, and other txt at other sheets.
Thanks a lot.
Sub Import_Text()
Dim DestCell As Range
'Variable to capture full path of selected text file
Dim strFullPath, tmp As String
'Get a text file name
strFullPath = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please select a text file to import...", "C:\TYPO_MANIN\Macro\1WeeksMeasurements")
'Exit the macro if the user has pressed Cancel on the open file dialog
If strFullPath = "False" Then Exit Sub
'Μπορώ να δηλώσω text = xlMacintosh από το Origin
Workbooks.OpenText Filename:=strFullPath, Origin _
:=437, StartRow:=6, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1)), _
TrailingMinusNumbers:=True
End Sub
Bookmarks