Sub CSVimport()
'
' CSVimport Macro
'
With Worksheets("CSV")
.Visible = xlSheetVisible
.Activate
.Range("A1").Select
End With
Sheets("CSV").Select
ActiveSheet.columns("A:C").Select
Selection.ClearContents
With ActiveSheet.QueryTables.Add(Connection:="TEXT;E:\Work\current.csv", _
Destination:=Range("$A$1"))
.Name = "current"
.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 = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Sheets("Active").Select
Worksheets("CSV").Visible = xlSheetVeryHidden
End Sub
Bookmarks