Hi,
welcome to this formum.
The problem with the numbers not showing in column B is with the decimal separator.
The data comes with a dot as separator and then the macro replaces these dots by commas. Excel isn't handling that properly.
Add these two properties to the connection
.TextFileDecimalSeparator = "."
.TextFileThousandsSeparator = ","
and remove the lines replacing of dots by commas.
This will give the macro as below:
Sub Afrekeningen_Bijwerken()
'
' Afrekeningen_Bijwerken Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;F:\Afrekening 15-06-2017.csv", Destination:= _
Range("$A$12"))
'.CommandType = 0
.Name = "Afrekening 15-06-2017"
.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 = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileDecimalSeparator = "."
.TextFileThousandsSeparator = ","
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
' Columns("C:C").Select
' Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
' SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
' ReplaceFormat:=False
Columns("C:C").EntireColumn.AutoFit
Range("I1:L1").Select
Selection.Copy
Range("I13:L20").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("A13").Select
End Sub
Bookmarks