QueryTable.Parameters property (Excel)
Returns a Parameters collection that represents the query table parameters. Read-only.
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.
You can 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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.