Syntax

expression.SourceRange

expression A variable that represents a Parameter object.

Example

This example changes the value of the cell used as the source range for the query.

Visual Basic for Applications
Set qt = Sheets("sheet1").QueryTables(1) Set param1 = qt.Parameters(1) Set r = param1.SourceRange r.Value = "New York" qt.Refresh
Get the address of the cell that contains the query parameter? Return query parameter location? source range Source Range Property SourceRange SourceRange Property

See also: