SCTrojan_1
New Member
- Joined
- Dec 1, 2021
- Messages
- 1
- Office Version
- 2021
- Platform
- MacOS
I created a macro that pulls data from the web but when I run the macro the new data posts next to the old data rather than overwriting. The code is as follows:
Application.CutCopyMode = False
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;/Users/damianalonzo/Desktop/Rankings.iqy.txt", Destination:=Range( _
"$A$1"))
.Name = "Rankings.iqy"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.RefreshPeriod = False
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = False
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
End Sub
Any help would be appreciated.
Application.CutCopyMode = False
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;/Users/damianalonzo/Desktop/Rankings.iqy.txt", Destination:=Range( _
"$A$1"))
.Name = "Rankings.iqy"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.RefreshPeriod = False
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingAll
.WebPreFormattedTextToColumns = False
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
End Sub
Any help would be appreciated.