Jeffers1984
New Member
- Joined
- Jan 8, 2011
- Messages
- 8
Good morning everyone,
I have created the following code, which takes a search term and creates then launches each hyperlink into Internet Explorer - By and large it works, which is great... but it is almost like the code is too fast for Internet Explorer and it only opens every few search terms, for example, I have a list of 40 searches and I will only recieve nine results, however, it does create the Coded hyperlink in the next cell.
Is there anything I can do to resolve this?
I have created the following code, which takes a search term and creates then launches each hyperlink into Internet Explorer - By and large it works, which is great... but it is almost like the code is too fast for Internet Explorer and it only opens every few search terms, for example, I have a list of 40 searches and I will only recieve nine results, however, it does create the Coded hyperlink in the next cell.
Is there anything I can do to resolve this?
Code:
Sub ReedJobSearches()
'
'
'This has been created to allow me to search New REED jobs quickly and effeciently.
'
'
'Set Dim's
'
'
Dim lLR As Long ' Last used Row
Dim rCell As Range ' Cells in Range
Dim strSearch As String ' Search String
Dim sDATE As String ' Format correct Date
Dim SrcString As String ' Complete Search String
'Turn Screen Updating off
Application.ScreenUpdating = False
'Set Date
sDATE = Format(Date, "dd/mm/yyyy")
'Count LastRows
Sheets("Search Sheet").Activate
lLR = Range("B65536").End(xlUp).Row
'Set rCell range (MyRange)
Range("B7:B" & lLR).Name = "MyRange"
'Start Loop
For Each rCell In Range("MyRange")
'Obtain Cell Values
strSearch = rCell.Value
SrcString = "http://www.reed.co.uk/jobs?keywords=" & strSearch
'Search LinkedIn
ThisWorkbook.FollowHyperlink "http://www.reed.co.uk/jobs?keywords=" & strSearch, NewWindow:=True
'Populate Date cell
rCell.Offset(, 4).Value = sDATE
'Populate Search String
rCell.Offset(, 5).Value = SrcString
'Select Hyperlink Anchor
rCell.Offset(, 6).Select
'Add HyperLink
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
SrcString, _
TextToDisplay:="Click HERE to manually search"
'End Loop
Next rCell
'Go to LinkedIn Sheet
Sheets("LinkedIn Media Job Search").Activate
'Find LastRow on LinkedIn sheet
lLR = Range("D65536").End(xlUp).Row
'Populate date in final Cell
Range("c" & lLR + 1).Value = sDATE
'Add Screen Updating
Application.ScreenUpdating = True
'Complete with MsgBox
MsgBox ("Searches Complete, please check all searches have been completed correctly!")
End Sub