[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


VB WebBrowser Frames Login problem

Posted on 2004-10-29
Medium Priority
Last Modified: 2013-12-26
I'm Trying to automate a Login Proccess with WebBrowser Control. The web is www.aag.com.ar/clubes. The problem is that when I go to: IE.navigate "www.aag.com.ar/clubes" there is no "txtUsuario" field to fill. But if I go to IE.navigate "www.aag.com.ar/clubes/editorial.asp" I find it. The problem is that if I do the last option when I "click" on the Log In Link, it does nothing. It's like www.aag.com.ar/clubes is divided in Frames, but i check out this and only 2 frames appear. The Login Frame is not appearing. How can i handle this problem?
Question by:Ezes
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 12450533
First u navigate to
Whet this document gets completed try to navigage
and after this Document is Loaded completely , "click" on the Log In Link


Author Comment

ID: 12450577
I tried that by doing the following:
Ie.navigate "www.aag.com.ar/clubes"
on the Document_Complete: I use another control IE2 by:
IE2.navigate "www.aag.com.ar/clubes/editorial.asp" and
Set htmlelement = IE2.document.All.Item("txtUsuario")
htmlelement.Value = "C110GF"
Set htmlelement = IE2.document.All.Item"txtPassword")
htmlelement.Value = "C110GF"
Set htmlelement = IE2.document.links.Item(0)

But still doesn´t work...
LVL 17

Expert Comment

ID: 12451731
editorial.asp is within 2 different framesets (/   ->   /frahome.asp   ->  /editorial.asp).

Private Sub Command1_Click()
    Dim objDoc As Object
    Call WebBrowser1.Navigate("http://www.aag.com.ar/clubes/")
    Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
    Set objDoc = WebBrowser1.Document
    Set objDoc = objDoc.frames(1).Document
    Set objDoc = objDoc.frames(1).Document
    'fill in form
    objDoc.frmLogin.txtUsuario.Value = "user?"
    objDoc.frmLogin.txtPassword.Value = "pass?"
    'submit form...
    Call objDoc.frmLogin.submit
End Sub
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12454634
Thanks....It worked perfect....I can continue now....

Author Comment

ID: 12455883
I'm now having this error and don´t understand why...
I carry on "navigating" through this web and have to set 3 times the objDoc.
Set objDoc = IE.document
    Set objDoc = objDoc.frames(1).document
    Set objDoc = objDoc.frames(1).document
    Set objDoc = objDoc.frames(1).document

It ones worked, but now i have the following error:
-2147352567 Exception....

Author Comment

ID: 12457189
My mistake....i had commented some lines and didn´t notice it...The problem now is the following. I'm trying to download a file by "clicking" a link, but i don't want to be displayed the window for saving the file....
LVL 17

Accepted Solution

zzzzzooc earned 1000 total points
ID: 12460934
>>Question Title: VB WebBrowser Frames Login problem
I believe your question is resolved.

>>but i don't want to be displayed the window for saving the file
You can handle it in the BeforeNavigate2() event. If it's the file is in the URL parameter, download it manually (through INET for example) and set Cancel to "True" so the browser does not navigate to it.

Since it's an entirely different question, I'm not going to comment further on it. I hope you understand.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question