salah
salah

Reputation: 11

Extract element from html document with vba excel

I have this code below from HTML document, result of inspection object from site web.
I want to get the object <input name="username" value=""> with VBA Excel code.

<tr id="username_block"> 
    <td class="shade" width="50%" align="right"> 
        <div align="left">Nom d’utilisateur:</div>
    </td>
    <td class="shade" width="50%"> 
        <input name="username" value="">
    </td>
</tr>

I use this instruction

set element=oIe.Document.getElementsById("username_block")

but no results (element=nothing).

Upvotes: 1

Views: 93

Answers (1)

Claudio
Claudio

Reputation: 85

Isn't the method's name getElementById, without "s"?

Upvotes: 3

Related Questions