Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- With ActiveSheet.listObjects.Add(SourceType:=0, Source:= _
- "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=""gpa txt""" _
- , Destination:=Range("$A$1")).QueryTable
- .CommandType = xlCmdSql
- .CommandText = Array("SELECT * FROM [gpa txt]")
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = xlInsertDeleteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = True
- .RefreshPeriod = 0
- .PreserveColumnInfo = False
- .ListObject.DisplayName = "gpa.txt"
- .Refresh BackgroundQuery:=False
- End With
- Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
- ActiveWindow.SmallScroll Down:=24
- ActiveSheet.listObjects("gpa_txt").Range.AutoFilter Field:=1, Criteria1:= _
- "TOTAL DAS LOJAS"
- Rows("6:159").Select
- Selection.Delete Shift:=xlUp
- ActiveSheet.listObjects("gpa_txt").Range.AutoFilter Field:=1
- ActiveWorkbook.SaveAs
- Call lsSalva
Add Comment
Please, Sign In to add comment