Parameter Object and the Parameters Collection Example

Sub UpdateQuery()

Dim oParam As Parameter

'Using the Query Table(

With ActiveSheet.ListObjects(l)

.QueryTable

'Get the first parameter

Set oParam = .Parameters(l)

'Set its value

oParam.SetParam xlConstant,

"Company"

'Refresh the query

.Refresh

End With

End Sub

0 0

Post a comment