使用 excel vba 实现网络自动化

使用 excel vba 实现网络自动化

我正在尝试使用 excel vba 自动化此网站:“checkcosmetic.net”。到目前为止,我所做的是:

Dim ie As New InternetExplorer
Dim frm As Object
Dim htm As HTMLDocument
____________________________________________________

Sub checkNow()
ie.navigate ("www.checkcosmetic.net")
ie.Visible = True
ie.Silent = True
Do
Loop Until ie.readyState = READYSTATE_COMPLETE
Set htm = ie.document
Set frm = htm.forms.Item

For Each elm In frm
'
'how to select "brands?"
'
If elm.ID = "codeinput" Then
elm.Value = "09076JU40" 'LOT No. of a Vaseline body moisturizing cream
End If

If elm.ID = "codesubmit" Then
elm.Click 'not triggering?
End If
Next elm
End Sub

我无法通过编程选择选项列表。
我的目标是从 Excel 中检查化妆品的有效期。
例如:
   产品:“凡士林”,批号:“09076JU40”=>“2016 年 9 月 7 日”

相关内容