Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

How to enter Data in Internet explorer textbox using VBA excel

$
0
0

I'm a complete newbie for Excel VBA, but what I'm trying to accomplish is enter a text into a text box, whose code is

<input name="txt_invoiceno" type="text" maxlength="16" id="txt_invoiceno" tabindex="1" class="text-left" style="width:150px;"> 

This is my VBA code

Dim Inv as Object
Inv = ie.Documents.getelementsbyId("txt_invoiceno")
Inv.value="mytext"

This just gives me an error

Object doesn't support this property or method.

Am I doing anything wrong? Please someone give me code to enter text into the element.


Viewing all articles
Browse latest Browse all 88854