A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
It's not the same problem at all... (which is why this was moved to a new thread.
Even though there is substantial compatibility between versions of XL, there are still differences. In this case, a quick glance at the Object Browser reveals that the code is attempting to set QueryTable properties that are Win-XL only.
Replace the WIth..End With block with this:
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & myStr _
, Destination:=Range("$A$9"))
.Name = _
"gross_profit_margin?start_month=3&start_day=1&start_year=2003&end_month=5&end_day=1&end_year=2007_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
' .PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
'.RefreshPeriod = 0
'.WebSelectionType = xlEntirePage'
' .WebFormatting = xlWebFormattingNone
'.WebPreFormattedTextToColumns = True
' .WebConsecutiveDelimitersAsOne = True
'.WebSingleBlockTextImport = False
' .WebDisableDateRecognition = False
'.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With