阅读背景:

无法访问登录按钮。VBA代码

来源:互联网 
Sub login()
  Dim IE As Object
  Dim HTMLDoc As Object, HTMLDoc2 As Object
  Dim objCollection As Object

  Const navOpenInNewTab = &H800
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Visible = True
  IE.Navigate "https:///CWRWeb/displayMemberLogin.do"

  Do While IE.Busy Or IE.ReadyState <> 4: Loop

  Set HTMLDoc = IE.Document

  With HTMLDoc
  HTMLDoc.getElementByID("userID").Value = "yyyy"    'Entering credential
  HTMLDoc.getElementByID("passwd").Value = "xxxxx"
  End With


  Set objCollection = IE.Document.getElementByID("login-s")
  objCollection.Click

End Sub
Sub login()
  Dim IE As Object
  Dim HTMLDoc As



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: