WebDisableRedirections 属性 (Excel)QueryTable.WebDisableRedirections property (Excel)

如此如果对一个查询表对象禁用 web **** 查询重定向。True if web query redirections are disabled for a QueryTable object. 默认值为 FalseThe default value is False. 读取/写入 BooleanRead/write Boolean.

语法Syntax

表达式WebDisableRedirectionsexpression.WebDisableRedirections

_表达式_一个代表查询表对象**** 的变量。expression A variable that represents a QueryTable object.

注解Remarks

如果使用用户界面导入数据, 则会将来自 web 查询或文本查询的数据作为一个查询表**** 对象导入, 而将所有其他外部数据作为**ListObject** 对象导入。If you import data by 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.

如果使用对象模型导入数据, 则必须将来自 web 查询或文本查询的数据作为查询表导入****, 而所有其他外部数据均可作为ListObject或查询表导入。 ****If you import data by 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.

WebDisableRedirections 属性仅适用于 QueryTable 对象。The WebDisableRedirections property applies only to QueryTable objects.

示例Example

在此示例中, Microsoft Excel 确定了工作簿中第一个工作表的 web 查询重定向设置。In this example, Microsoft Excel determines the settings of web query redirections for the first worksheet in the workbook. 本示例假定第一个**** 工作表上存在一个查询表对象;否则, 将发生运行时错误。This example assumes that a QueryTable object exists on the first worksheet; otherwise, a run-time error occurs.

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

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.