title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
QueryTable.Parameters property (Excel) |
vbaxl10.chm518093 |
|
|
d82f0ef7-9e3a-b9e5-9b9f-d402fb7a573e |
05/03/2019 |
medium |
Returns a Parameters collection that represents the query table parameters. Read-only.
expression.Parameters
expression A variable that represents a QueryTable object.
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.
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.
Use the QueryTable property of the ListObject to access the Parameters property.
This example returns the Parameters collection from an existing parameter query. If the first parameter uses the character data type, the user is instructed to enter characters only in the prompt dialog box.
With Sheets("sheet1").QueryTables(1).Parameters(1)
If .DataType = xlParamTypeVarChar Then
.SetParam xlPrompt, "Enter a character only"
End If
End With
[!includeSupport and feedback]