Ranjith kumar
New Member
Hi everyone,
I'm trying to automate filling a webform using Internet explorer but i'm not getting that, I get the following error : 'Object variable or with block variable not set'
This is the code I'm using
Please help me with this, thanks in advance.
I'm trying to automate filling a webform using Internet explorer but i'm not getting that, I get the following error : 'Object variable or with block variable not set'
This is the code I'm using
Code:
Public Sub testing()
Dim MyDoc As Object
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate ("http://164.100.80.164/vow/Home.aspx")
Do Until IE.readyState = 4
DoEvents
Loop
Set MyDoc = IE.document
MyDoc.getElementById("ctl00_MainContent_lbcitizens").Click
Do Until IE.readyState = 4
DoEvents
Loop
Set MyDoc = IE.document
MyDoc.getElementById("ctl00_MainContent_txtownername").Value = "Ranjith"
End Sub
Please help me with this, thanks in advance.