Link to home
Start Free TrialLog in
Avatar of azcalv408
azcalv408

asked on

vb read table from IE web page

Hi,
     I wrote this piece of code to connect to explorer, open a webpage, and copy data from there by searching for a field name...What is the easiest or efficient way to copy data from a table located on a web page ?

Dim oIE, oIEDoc
Dim aInput As Variant
'Create the IE Application object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True

'Load page with data
oIE.Navigate ("http://172.20.41.11/test/FGPH_Detail.asp?varCrit=test-1Z&submit1=Submit+Query")
'Wait for page to load
Do While (oIE.ReadyState <> 4)
Loop

'Capture the IE document
Set oIEDoc = oIE.document
Set oBody = oIEDoc.Body
'Field Name
Text = "Customer Name"
dietype = InStr(oBody.innerText, Text)

oIE.Quit
Set oIE = Nothing
ASKER CERTIFIED SOLUTION
Avatar of jomacinc
jomacinc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial