Syntax

expression.WebTables

expression A variable that represents a QueryTable object.

Remarks

Use this property only when the query table's property is set to xlWebQuery, the query returns an HTML document, and the value of the property is xlSpecifiedTables.

Example

This example adds a new Web query table to the first worksheet in the first workbook and then imports data from the first and second tables in the Web page.

Visual Basic for Applications
Set shFirstQtr = Workbooks(1).Worksheets(1) Set qtQtrResults = shFirstQtr.QueryTables _ .Add(Connection := "URL;http://datasvr/98q1/19980331.htm", _ Destination := shFirstQtr.Cells(1,1)) With qtQtrResults .WebFormatting = xlNone .WebSelectionType = xlSpecifiedTables .WebTables = "1,2" .Refresh End With 
web web tables Web Tables Property WebTables WebTables Property

See also: