I am trying to create a macro that will run a web query that automatically references a specific cell to input the parameter, but I keep getting the prompt to input the parameter when I run the macro (URL changed for privacy).
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://webquery.com/profile.[""ID""]", _
Destination:=Range("A3"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
With ActiveWorkbook.Connections("Connection")
.Name = "Connection"
.Description = ""
I should say that I am not great with code, so I'm mostly trying to do this by recording, which is likely where I'm going wrong. Thanks in advance for your help!
Bookmarks