Show the code please!! As an alternative, simply turn on the macro recorder,
and click as follows:
Data > Import External Data > New Web Query...then enter in the URL of
interest and navigate to the specific part of the site that is of interest.
I did just that, and received the following code:
Sub Macro1()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;
http://finance.yahoo.com/q?s=IBM", Destination:=Range("A1"))
.Name = "q?s=IBM"
.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 = """table1"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Try it and see what happens...
Regards,
Ryan---