1 Attachment(s)
[RESOLVED] Web Pull Call - Wait - Call - proceed
Hi Try again better version of spread sheet : )
Simply trying to get Web Pull to get Race Results.
1/ If Race Results not there when first requested Web Pull Waits 1 minute then Request again, until the Results
are there.
2/ Then simply proceed to next Macro
Thanks in advance of course to the master who cracks it :cool::cool:
Mike : )
Re: Web Pull Call - Wait - Call - proceed
is this different from your other thread?
as i can not open .xlsm, only .xls, i can not look at your workbook
perhaps you can use application.ontime to create a delay, between calls to the web pull, until successful
it always depends if you want excel to go into unresponsive while waiting
1 Attachment(s)
Re: Web Pull Call - Wait - Call - proceed
Hi
Yes other was Web pull not running in sequence found fix for that
This one re as explained 1st entry
I have saved sheet non xlsm if that works for you
Any chance you could take a look would be good
Chilled out Mike : )
Re: Web Pull Call - Wait - Call - proceed
Quote:
I have saved sheet non xlsm if that works for you
no i can only open early version (.xls) anyway need to see what code you are using, so need the macros to be included
SaveAs excel 2003 or earlier
Re: Web Pull Call - Wait - Call - proceed
Oh thought non Xlms version would still have code, just not work but no, no Vba code at all.
My comp won't let me save as 2003 version crashes and gets Microsoft error report
Basically code for web pull is below
1st macro Calls WebPull
Quote:
Sub WebPull()
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;https://ebet.tab.co.nz/odds/" & Sheets("race").Range("ac7").Value & Sheets("race").Range("ab7").Value & Sheets("race").Range("aa7").Value & ".html", Destination:=Range("$w$13"))
.Name = False
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 1
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Call Macro152 'Transfers record sheet
End Sub
What i would like if poss is in 1st entry of this thread
ideas = Loops x1 / on error / Application wait 1 min / Loop again / On error Application wait 1 min / continue
Until Results appear then as normal move onto next Macro.
For anyone who knows loops and Application wait, surely it can't be that tricky ? but ?
Ok Mate see how ya go
Cheers
Mike
Re: Web Pull Call - Wait - Call - proceed
what are some values in sheet (aa7:ac7) for url?
Re: Web Pull Call - Wait - Call - proceed
aa7 = The race number 1 through10
ab7 = The race Code AUCK or WELR depending on where the meting is
ac = Date 20131208
https://ebet.tab.co.nz/odds/20131208YPUK1.html
Cheers
Re: Web Pull Call - Wait - Call - proceed
you can try like
Code:
End With
If Not Err.Number = 0 Then
Application.OnTime Now + TimeSerial(0, 1, 0), "webpull"
Err.Clear
Exit Sub
End If
Call Macro152 'Transfers record sheet
put on error resume next at the top of procedure
note this will only work if an error is generated
Re: Web Pull Call - Wait - Call - proceed
Oh cool
Will give it ago tomorrow then
What a great site this is : )
Will let ya know how it goes
Thank you very much kind Sir
You da Man :)
Mike : )
Re: Web Pull Call - Wait - Call - proceed
Hi
Just getting back to the forum
Little bit of code above appears to be working OK but need to trial longer not sure if it has encountered non result issue as yet : )
Re: Web Pull Call - Wait - Call - proceed
Quote:
not sure if it has encountered non result issue as yet
put some counter or output to log so you can see what is happening
Re: Web Pull Call - Wait - Call - proceed
Re: Web Pull Call - Wait - Call - proceed
Pretty sure it does do the trick now : )
Resolved
Mike :)