VB Code:
Dim qtsQueries As QueryTables
Dim qtQuery As QueryTable
Set qtsQueries = ActiveSheet.QueryTables
Set qtQuery = qtsQueries.Add _
("URL;http://whatever.com/stuff.asp", _
Application.Range("A1"))
With qtQuery
.Refresh
If .FetchedRowOverflow Then
MsgBox "Your request returned too many results. " _
& "Please refine your search.", vbInformation, "Result Error"
End If
End With
It works fine, I guess, but it says it was written for Excel 2002. Can anyone let me know if this is considered best practice or not? I'm actually targeting Excel 2003.