Web Query

  • Thread starter Thread starter Mike Berger
  • Start date Start date
M

Mike Berger

Does anyone know if I can dynamically generate a Web Query ? I want to allow
the user to enter a code, and this code will be part of the URL for the web
query. So I need to dynamically generate the entire Web Query, or
dynamically update a saved Web Query. Make sense ?

Thanks
Mike
 
Mike

Set it up manually, then change the Connection string and Refresh. Here's
an example

Sub LookUpWord()

Dim MyURL As String
Dim TheWord As String

MyURL = "URL;http://dictionary.reference.com/search?q="

TheWord = Application.InputBox("Enter a word")

MyURL = MyURL & TheWord & "&db=*"

With Sheet1.QueryTables(1)
.Connection = MyURL
.Refresh
End With

End Sub
 
Back
Top