前一阵在做淘宝网的东东,贴一个用IE登录淘宝网的
Option Explicit
Sub GotoTaoBao(uid As String, pwd As String)
With CreateObject("InternetExplorer.Application")
.Visible = True
.Navigate "
http://auction1.taobao.com/auction/view_personal_sale_item.jhtml?view_type=viewsold"
Do Until .ReadyState = 4
DoEvents
Loop
.Document.Forms(0).All("TPL_username").Value = uid
.Document.Forms(0).All("TPL_password").Value = pwd
.Document.Forms(0).All("Submit").Click
End With
End Sub
Private Sub Command1_Click()
GotoTaoBao "youID", "youPwd"
End Sub
不用CreateObject的话,要引用Microsoft Internet Controls (shdocvw.dll)
然后声明一个InternetExplorer对象...