Private
Sub
Import_Button_Click()
Dim
length
As
Double
Dim
x
As
Double
Workbooks(
"SDC_0.31.xlsm"
).Sheets(
"INPUT"
).Columns(
"A:L"
).Delete Shift:=xlToLeft
filename = Application.GetOpenFilename(fileFilter:=
"Text Files (*.txt), *.txt"
)
With
Workbooks(
"SDC_0.31.xlsm"
).Sheets(
"INPUT"
).QueryTables.Add(Connection:=
"TEXT;"
& filename, Destination:=Workbooks(
"SDC_0.31.xlsm"
).Sheets(
"INPUT"
).Range(
"$A$1"
))
.Name =
"Import"
.FieldNames =
True
.RowNumbers =
False
.FillAdjacentFormulas =
False
.PreserveFormatting =
True
.RefreshOnFileOpen =
False
.RefreshStyle = xlInsertDeleteCells
.SavePassword =
False
.SaveData =
True
.AdjustColumnWidth =
True
.RefreshPeriod = 0
.TextFilePromptOnRefresh =
False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter =
False
.TextFileTabDelimiter =
True
.TextFileSemicolonDelimiter =
False
.TextFileCommaDelimiter =
False
.TextFileSpaceDelimiter =
False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers =
True
.Refresh BackgroundQuery:=
False
End
With
End
Sub