If anyone can take a look I would, appreciate it, this is the query that doesn't work for me under Excel XP, but works fine under 2000:
Sub check_date()
' Checks the 'online' date against the last time the query was run to see if worth while
Dim new_date As String
'Create worksheet for the query
Worksheets.Add.Move after:=Worksheets(2)
With Worksheets(3)
With .QueryTables.Add(Connection:= _
"URL;http://ccgi.kjcgames.com/1024/dataStore/markets.php" _
, Destination:=.Range("A1"))
.Name = "markets.php"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
new_date = Mid(Cells(6, 2), InStr(Cells(6, 2), "updated") + 8) 'Get date and time of update
'Delete Scratch sheet
Application.DisplayAlerts = False
.Delete
Application.DisplayAlerts = True
End With
rubish = MsgBox(new_date)
End Sub
Thanks all,
Phil
Bookmarks