aabrahamson
New Member
- Joined
- Jun 15, 2014
- Messages
- 13
Hi I am rather new to this and have written a VBA by following some directions to call back a specific table data from a webpage, but I would like to be able to do this for multiple rows at a time not just one. can any one help. Here is what I have so far
My sheet is setup to have a EIN column and a Name column,
+++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = Range("EIN").Row And _
Target.Column = Range("EIN").Column Then
Dim IE As New InternetExplorer
IE.Visible = True
IE.navigate "http://apps.irs.gov/app/eos/pub78Search.do?names=&city=&state=All...&country=US&deductibility=all&dispatchMethod=searchCharities&submitName=Search&ein1=" & Range("EIN").Value
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Trim(Doc.getElementsByTagName("tr")(3).innerText)
IE.Quit
Dim aDD As Variant
aDD = Split(sDD, ":")
Range("Name").Value = aDD(0)
End If
End Sub
My sheet is setup to have a EIN column and a Name column,
+++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = Range("EIN").Row And _
Target.Column = Range("EIN").Column Then
Dim IE As New InternetExplorer
IE.Visible = True
IE.navigate "http://apps.irs.gov/app/eos/pub78Search.do?names=&city=&state=All...&country=US&deductibility=all&dispatchMethod=searchCharities&submitName=Search&ein1=" & Range("EIN").Value
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Trim(Doc.getElementsByTagName("tr")(3).innerText)
IE.Quit
Dim aDD As Variant
aDD = Split(sDD, ":")
Range("Name").Value = aDD(0)
End If
End Sub