这个变量最准确的类型是什么?

时间:2016-11-01 10:04:45

标签: html vba variable-names

这是我的代码的一部分。我设法获得了我想要的结果,但只是将Elements声明为变体,因为它没有作为HTMLElementCollection工作。有人能解释一下为什么吗?那么最准确的变量是什么呢?感谢

' Find + Click on the login Button
' We filter the elements which have the tagename <input> since as we can see in the code that the login element is on of them
    Set Elements = IEDoc.getElementsByTagName("input")
    For Each element In Elements

        If (element.getAttribute("value") = "Login") Then ' we go through each elements with the tagname input and if the value term
            element.Click                                  ' is called "Login" then we click on that element
            Exit For
        End If

     Next element

0 个答案:

没有答案