Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Range("B9").Select()
- With Selection.ListObject.QueryTable
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = xlInsertDeleteCells
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = False
- .RefreshPeriod = 0
- .PreserveColumnInfo = True
- End With
- Dim excelApp AS Object = CreateObject("Excel.Application")
- excelApp.Workbooks.Open(Filename:=_file)
- With excelApp.ActiveWorkbook.Worksheets(0).Cells(9, 2).QueryTable
- .RowNumbers = False
- .FillAdjacentFormulas = False
- .PreserveFormatting = True
- .RefreshOnFileOpen = False
- .BackgroundQuery = True
- .RefreshStyle = 1
- .SavePassword = False
- .SaveData = True
- .AdjustColumnWidth = False
- .RefreshPeriod = 0
- .PreserveColumnInfo = True
- End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement