Sub adddata()
'
' adddata Macro
'
'
Range("AC6:AK32").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\Martyn Mordecai\Desktop\speedofservice.prn", Destination:= _
Range("$AC$6"))
.Name = "speedofservice"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(6, 10, 10, 10, 7, 9, 6, 2, 9, 6, 8, 9, 14, 5, 15, 8)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("AB6").Select
End Sub
Bookmarks