I am running a macro to import txt data. But this macro is bringing the information below after a white line
(9 rows (s) affected)
The information of the data is correct, however it has this line that I need the macro to delete.
This via VBA code.
Edited: macro code based on comments
Sub XPTO()
With ActiveSheet.QueryTables.Add(Connection:= "TEXT;Z:\Promessas_diarias_AES_RC_20150304_210000.txt", Destination:= Range(Selection.Address))
.Name = "Promessas_diarias_AES_RC_20150304_210000"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 5
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=6
Range("F569:L570").Select
Selection.ClearContents
Range("F569").Select
End Sub
Sub OptionPane()
MsgBox (Selection.Address)
MsgBox Day(Date)
MsgBox Month(Date)
MsgBox Year(Date)
End Sub