daily pastebin goal
30%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. With ActiveSheet.listObjects.Add(SourceType:=0, Source:= _
  2.     "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=""gpa txt""" _
  3.     , Destination:=Range("$A$1")).QueryTable
  4.     .CommandType = xlCmdSql
  5.     .CommandText = Array("SELECT * FROM [gpa txt]")
  6.     .RowNumbers = False
  7.     .FillAdjacentFormulas = False
  8.     .PreserveFormatting = True
  9.     .RefreshOnFileOpen = False
  10.     .BackgroundQuery = True
  11.     .RefreshStyle = xlInsertDeleteCells
  12.     .SavePassword = False
  13.     .SaveData = True
  14.     .AdjustColumnWidth = True
  15.     .RefreshPeriod = 0
  16.     .PreserveColumnInfo = False
  17.     .ListObject.DisplayName = "gpa.txt"
  18.     .Refresh BackgroundQuery:=False
  19. End With
  20. Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
  21. ActiveWindow.SmallScroll Down:=24
  22. ActiveSheet.listObjects("gpa_txt").Range.AutoFilter Field:=1, Criteria1:= _
  23.     "TOTAL DAS LOJAS"
  24. Rows("6:159").Select
  25. Selection.Delete Shift:=xlUp
  26. ActiveSheet.listObjects("gpa_txt").Range.AutoFilter Field:=1
  27.  
  28. ActiveWorkbook.SaveAs
  29. Call lsSalva
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top