Results 1 to 13 of 13

Thread: [RESOLVED] Web Pull Call - Wait - Call - proceed

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    Resolved [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

    Mike : )
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    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 : )
    Attached Files Attached Files

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Web Pull Call - Wait - Call - proceed

    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
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    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

    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

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Web Pull Call - Wait - Call - proceed

    what are some values in sheet (aa7:ac7) for url?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    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

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    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 : )

  10. #10

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    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 : )

  11. #11
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Web Pull Call - Wait - Call - proceed

    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
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  12. #12

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    Re: Web Pull Call - Wait - Call - proceed

    See this thread

    It didn't quite work

    http://www.vbforums.com/showthread.p...-1-min-No-work

    Mike

  13. #13

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    Re: Web Pull Call - Wait - Call - proceed

    Pretty sure it does do the trick now : )

    Resolved

    Mike

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width