其实和普通登陆界面一样 Private Sub web_DocumentComplete(ByVal pDisp As Object, URL As Variant) if url=登陆页的地址 Set obj = doc.All.tags("input") Dim inputer As HTMLInputTextElement For Each inputer In obj '开始填写表单 Select Case inputer.Name Case "username" inputer.Value = 用户名 Case "password" inputer.Value = 密码 End Select Next Dim inputbutton As HTMLInputElement For Each inputbutton In obj '寻找登陆按纽并点击 If inputbutton.Type = "submit" Then inputbutton.Click Next end if end sub
Private Sub web_DocumentComplete(ByVal pDisp As Object, URL As Variant)
if url=登陆页的地址
Set obj = doc.All.tags("input")
Dim inputer As HTMLInputTextElement
For Each inputer In obj '开始填写表单
Select Case inputer.Name
Case "username"
inputer.Value = 用户名
Case "password"
inputer.Value = 密码
End Select
Next
Dim inputbutton As HTMLInputElement
For Each inputbutton In obj '寻找登陆按纽并点击
If inputbutton.Type = "submit" Then inputbutton.Click
Next
end if
end sub
set doc=web.document