hi

there is a small problem in codes need help

i am useing these codes

and here is site login link
http://crypo.freeforums.org/ucp.php?mode=login

Private Sub cmdlogin_Click()
WebBrowser1.Navigate "http://crypo.freeforums.org/ucp.php?mode=login"
lblstatus.Caption = "Connecting...."
End Sub




Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "http://crypo.freeforums.org/ucp.php?mode=login" Then
WebBrowser1.Document.All("Username").Value = user.Text
WebBrowser1.Document.All("Password").Value = pass.Text
WebBrowser1.Document.All("Login").Click  "problem is in this line"
End If
End Sub

WebBrowser1.Document.All("Login").Click

how it can b fixed need help

Edited 4 Years Ago by honeybee2090

Hi,

This works... But may be login name/ password are invalid...

Dim Doc
Dim thing
If URL = "http://crypo.freeforums.org/ucp.php?mode=login" Then
    WebBrowser1.Document.All("Username").Value = user.Text
    WebBrowser1.Document.All("Password").Value = pass.Text
    Set Doc = WebBrowser1.Document
    For Each thing In Doc.All
        If thing.tagname = "INPUT" Then
            If thing.Type = "submit" Then
                If thing.Value = "Login" Then
                    thing.Click
                    Exit For
                End If
            End If
        End If
    Next
End If

Regards
Veena

This article has been dead for over six months. Start a new discussion instead.