Sub
test()
Dim
eRow
As
Long
Dim
ele
As
Object
Set
sht = Sheets(“Sheet1”)
RowCount = 1
sht.Range(“A” & RowCount) = “Title”
sht.Range(“B” & RowCount) = “Company”
sht.Range(“C” & RowCount) = “Location”
sht.Range(“D” & RowCount) = “Description”
eRow = Sheet1.Cells(Rows.Count, 1).
End
(xlUp).Offset(1, 0).Row
Set
objIE = CreateObject(“InternetExplorer.Application”)
myjobtype = InputBox(“Enter type of job eg. sales, administration”)
myzip = InputBox(“Enter zipcode of area where you wish to work”)
With
objIE
.Visible =
True
Do
While
.Busy
Or
_
.readyState <> 4
DoEvents
Loop
Set
what = .document.getElementsByName(“q”)
what.Item(0).Value = myjobtype
Set
zipcode = .document.getElementsByName(“where”)
zipcode.Item(0).Value = myzip
.document.getElementById(“JobsButton”).Click
Do
While
.Busy
Or
_
.readyState <> 4
DoEvents
Loop
For
Each
ele
In
.document.all
Select
Case
ele.classname
Case
“Result”
RowCount = RowCount + 1
Case
“Title”
sht.Range(“A” & RowCount) = ele.innertext
Case
“Company”
sht.Range(“B” & RowCount) = ele.innertext
Case
“Location”
sht.Range(“C” & RowCount) = ele.innertext
Case
“Description”
sht.Range(“D” & RowCount) = ele.innertext
End
Select
Next
ele
End
With
Macro1
Set
objIE =
Nothing
End
Sub