Macros and MsQueries

J

jeff

Hi,

Here's a start for you: on your Userform, put your
command button 1 and attach this code

Private Sub CommandButton1_Click()
URL_Static_Query
End Sub
Sub URL_Static_Query()

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://quote.money.cnn.com/quote/quote?
symbols=msft", _
Destination:=Range("a1"))

.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

There are a few good examples from Microsoft at
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/odc_xl2003_ta/html/odc_xlWebquery.asp

jeff
 
Top