Parameters Property

Applies To

QueryTable object.

Description

Returns a Parameters collection that represents the query table parameters. Read-only.

Example

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