Share via


QueryTable.WebDisableRedirections Property

Excel Developer Reference

True if Web query redirections are disabled for a QueryTable object. The default value is False. Read/write Boolean.

Syntax

expression.WebDisableRedirections

expression   A variable that represents a QueryTable object.

Remarks

If you import data using the user interface, data from a Web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object.

If you import data using the object model, data from a Web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable.

The WebDisableRedirections property applies only to QueryTable objects.

Example

In this example, Microsoft Excel determines the settings of Web query redirections for the first worksheet in the workbook. This example assumes a QueryTable object exists on the first worksheet, otherwise a run-time error will occur.

Visual Basic for Applications
  Sub CheckWebQuerySetting()
    Dim wksSheet As Worksheet
    Set wksSheet = Application.ActiveSheet
    MsgBox wksSheet.QueryTables(1).WebDisableRedirections
End Sub

See Also