title: login to a website with VBA ie
body: <p>I need to login in a website.
  Every time I make the credential insterted with VBA, after the click event, It say that the password is not correct.</p>
  
  <p>If I make the credential inserted by VBA and if I manually cancel one letter of the username and I rewrite it and if I manually cancel one letter of the password and I rewrite it, after I send the click event with VBA it works.</p>
  
  <p>which is the reason? Shound I insert the credential using kinda keypress event? Which is the correct syntax for that?</p>
  
  <p>thanks</p>
  
  <p>please see below HTML code and what I wrote in VBA</p>
  
  <pre><code>Set ie = CreateObject("InternetExplorer.Application")
      With ie
          .Visible = True
          .navigate "sss.html"
  
      Do Until .ReadyState = 4
          DoEvents
      Loop
      .Document.all.Item("login").Value = "username"
      .Document.all.Item("password").Value = "password"
  Set elems = ie.Document.getElementsByTagName("button")
  For Each e In elems
      If (e.innerHTML = "Confirm") Then
          e.Click
          Exit For
      End If
  Next e
  
  &lt;input type="text" ng-model="login" class="form-control ng-pristine ng-valid ng-touched" id="login" placeholder="Enter login (email)"&gt;
  &lt;input type="password" ng-model="password" class="form-control ng-pristine ng-valid ng-touched" id="password" placeholder="Password"&gt;
  &lt;button class="btn btn-default" ng-click="authenticate()" notranslate=""&gt;Confirm&lt;/button&gt;
  </code></pre>