Results 1 to 3 of 3
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    Novice Question..Dowhile Loop

    I am trying to navigate to different websites. A couple of these websites give a certificate error. I have tried automating this process but now realize I will need user interaction. I am trying to have IE Loop until the screen shows InStr"username" then from there the automation will pick up and sign the user in.

    However the code is completely skipping the loop command, and just resumes the code... Any ideas?



    Code:
    If InStr(oIE.Document.Body.innertext, "There is a problem with this website's security certificate.") > 0 Then          
        oIE.Navigate "javascript:alert('Please resolve security certificate issue.');"
        DoEvents
        Do While InStr(oIE.Document.Body.innertext, "Username") > 0
        Loop
        End If
    Last edited by redbull; 03-08-2012 at 02:34 PM. Reason: title change

  2. #2
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Solved, was able to figure it out.. don't know if it is good practice or not but here it is.


    Code:
        oIE.Navigate "javascript:alert('Please resolve security certificate issue.');"
        DoEvents
        Do Until InStr(oIE.Document.Body.innertext, "Username") > 0
        PauseApp 1
        Loop
        End If
    This gives the user infinite time to Accept the certificate error.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for sharing.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Novice question about multiple users
    By Buakaw in forum Security
    Replies: 3
    Last Post: 07-27-2011, 10:21 AM
  2. Novice at best
    By jmorse in forum Reports
    Replies: 8
    Last Post: 04-19-2011, 03:21 PM
  3. Really Novice Question
    By AccessNoob1 in forum Forms
    Replies: 1
    Last Post: 04-07-2011, 09:44 AM
  4. Novice question about using established forms
    By runabout6 in forum Access
    Replies: 2
    Last Post: 08-23-2010, 09:00 PM
  5. Replies: 1
    Last Post: 02-27-2006, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums