Parameter.RefreshOnChange Property
True if the specified query table is refreshed whenever you change the parameter value of a parameter query. Read/write Boolean.
Syntax
expression.RefreshOnChange
expression A variable that represents a Parameter object.
Remarks
You can set this property to True only if you use parameters of type xlRange and if the referenced parameter value is in a single cell. The refresh occurs when you change the value of the cell.
Example
This example changes the SQL statement for the first query table on Sheet1. The clause "(ContactTitle=?)" indicates that the query is a parameter query, and the value of the title is set to the value of cell D4. The query table will be automatically refreshed whenever the value of this cell changes.
| Visual Basic for Applications |
|---|
|