I recorded the process and it produced a macro like this:
Sub Macro2()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.mydearfriend.net", Destination:=Range("D4"))
.Name = "www.mydearfriend"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
You could use vba to put whatever values you wanted into this command and it
would probably work to put the data into your spreadsheet.