Hi all:
I've assigned the following macro containing a web query to a
workbook (not a particular sheet in a workbook):
Sub GetListOfTravellersForATournament()
'
' X Macro
' Macro recorded 3/23/2005 by AdministratorHDT
'
Worksheets("Sheet1").Select
Worksheets("Sheet1").Range("A1:Z200").Delete shift:=xlShiftUp
Range("A2").Select
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://online.bridgebase.com/myhands/" & _
"hands.php?tourney=150-1112822060-", _
Destination:=Range("A1"))
.Name = _
"Tournament #" & Worksheets("Sheet1").Range("A1").Value
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "3"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
When I run the macro from the Tools / Macro / Macros dialog box nothing
happens. I receive no error messages and the query does not populate
Sheet1.
When I use the Data / Import External Data / Edit Query Data menu to
bring up the query, immediately press the Cancel button, and then
execute the Macro it runs successfully.
I tried using the Macro Recorder to see what changes Excel makes to the
query when I execute the Data / Import External Data / Edit Query Data
command sequence. The resulting macro is empty! Go figure.
What gives? I admit I am a newbie regarding web queries. Other than the
debugging I described above I don't know how else to debug them. Any
debugging suggestions welcome.
There's probably something simple going on here that I don't
understand. Can anyone help me?
Moxy
Bookmarks