Results 1 to 4 of 4

Thread: webbrowser general help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    webbrowser general help

    i made a tool yes its running a webbrowser how can i programme my tool so if the page i want dont fully load up and it gets stuck while its loading up and stays there hanged how do i get the page to refresh and reload the page.

    1 : webbrowser1.navigate2 "example.com" the page gets hanged sometimes and stays there untill i manually press refresh.

    2: how do i put in some code so the timer runs and if that page isnt loaded then refresh the page and reload till webbrowser is loaded

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,622

    Re: webbrowser general help

    I would THINK you start a time each time you start loading a page. Then after a certain number of seconds in your timer, do your webbrowser1.navigate routine again---and when loaded, stop your timer. So I guess you need to know WHEN the page is fully loaded.....you can check that with this routine:

    Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object,
    URL As Variant)
    If (pDisp Is WebBrowser1.Object) Then
    MsgBox "Web document is finished downloading"
    End If
    End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: webbrowser general help

    thanks lemme check

  4. #4
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: webbrowser general help

    the question here is why does it get stuck? a page is suppose to load when you navigate to it.
    if it does not load properly it is either an error message (that you will need to click yes/no or OK)
    you only get those script error with webbrowser and not internet explorer.

    have you tried setting WebBrowser1.Silent = True at Form_Load()?

    if we could see which website it is doing that we could help you a bit more, I remember you said yahoo but i only had that script error popup once and now its always running fine

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