Thread: Web Query
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Web Query

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

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Mike Berger" wrote in message
...
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