+ Reply to Thread
Results 1 to 3 of 3

Help In IE Automation

Hybrid View

  1. #1
    Registered User
    Join Date
    12-25-2015
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    Help In IE Automation

    I am trying automate website login.
    I am able to add login value and password value but not able click submit.
    Please help me to correct my code
    Dim HTMLDoc As HTMLDocument
    Dim MyBrowser As InternetExplorer
     Sub MyGmail()
    
     Dim MyHTML_Element As IHTMLElement
     Dim MyURL As String
     On Error GoTo Err_Clear
     MyURL = "https://www.mysein.schneider-electric.com/mysedv/login.do"
     Set MyBrowser = New InternetExplorer
     MyBrowser.Silent = True
     MyBrowser.navigate MyURL
     MyBrowser.Visible = True
     Do
     Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
     Set HTMLDoc = MyBrowser.document
     HTMLDoc.all.Login.Value = "user1" 'Enter your email id here
     HTMLDoc.all.Password.Value = "1111" 'Enter your password here
     For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
     If MyHTML_Element.Name = "submit" Then MyHTML_Element.Click: Exit For
     Next
    Err_Clear:
     If Err <> 0 Then
     Err.Clear
     Resume Next
     End If
     End Sub
    url FOR SOURCE - view-source:https://www.mysein.schneider-electri...ysedv/login.do
    Last edited by alansidman; 12-25-2015 at 04:54 AM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !

    PHP Code: 
    Sub DemoIE()
        
    With CreateObject("InternetExplorer.Application")
            .
    Navigate "https://www.mysein.schneider-electric.com/mysedv/login.do"
            
    .Visible True
            
    While .Busy Or .ReadyState 4:  DoEvents:  Wend
            With 
    .Document.all
                    
    .login.value "user1"
                 
    .password.value "1111"
                 
    .Item(114).onclick
            End With
    '        .Quit
        End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 12-25-2015 at 10:26 AM.

  3. #3
    Registered User
    Join Date
    12-25-2015
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    Re: Help In IE Automation

    Thank You for reply

    And ya I am first time user.Definately I ll read the rules

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Automation
    By xxx87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2014, 04:41 AM
  2. [SOLVED] Please help with IE automation by VBA
    By vpnvipin in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-09-2013, 09:07 AM
  3. IE Automation
    By michaelvba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2011, 04:01 AM
  4. help with some automation
    By ExcelNoob2008 in forum Excel General
    Replies: 2
    Last Post: 01-28-2010, 05:01 AM
  5. Automation help!
    By vicco in forum Excel General
    Replies: 2
    Last Post: 05-16-2008, 05:18 PM
  6. Automation using VBA
    By kingfisher007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2008, 07:29 AM
  7. Automation.
    By kymbo46 in forum Excel General
    Replies: 3
    Last Post: 04-16-2007, 08:32 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1