Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. Range("B9").Select()
  2. With Selection.ListObject.QueryTable
  3. .RowNumbers = False
  4. .FillAdjacentFormulas = False
  5. .PreserveFormatting = True
  6. .RefreshOnFileOpen = False
  7. .BackgroundQuery = True
  8. .RefreshStyle = xlInsertDeleteCells
  9. .SavePassword = False
  10. .SaveData = True
  11. .AdjustColumnWidth = False
  12. .RefreshPeriod = 0
  13. .PreserveColumnInfo = True
  14. End With
  15.  
  16. Dim excelApp AS Object = CreateObject("Excel.Application")
  17. excelApp.Workbooks.Open(Filename:=_file)
  18.  
  19. With excelApp.ActiveWorkbook.Worksheets(0).Cells(9, 2).QueryTable
  20. .RowNumbers = False
  21. .FillAdjacentFormulas = False
  22. .PreserveFormatting = True
  23. .RefreshOnFileOpen = False
  24. .BackgroundQuery = True
  25. .RefreshStyle = 1
  26. .SavePassword = False
  27. .SaveData = True
  28. .AdjustColumnWidth = False
  29. .RefreshPeriod = 0
  30. .PreserveColumnInfo = True
  31. End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement