ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web Query Results to an Array (https://www.excelbanter.com/excel-programming/419627-web-query-results-array.html)

Raul

Web Query Results to an Array
 
I can define MyURL and use the following to ge the information I need to a
worksheet. But I'd like to know what I need to do to get the same
information directly into an array.

In other words, how can I query a web page (with web parts) in VBA and put
the results into an array?

With ActiveSheet.QueryTables.Add(Connection:=MyURL,
Destination:=Range("B2"))
.Name = "Sort%20by%20PBOMP%20No"
.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 = """onetidDoclibViewTbl0"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


Thanks in Advance,
Raul


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com