Jeffers1984
New Member
- Joined
- Jan 8, 2011
- Messages
- 8
Hi everyone,
I have come stuck on this, I keep getting a cross site scripting error or and automation error, I must be missing something, but quite honestly I don't know where to look anymore!! - Any help would be great!
I have created a series of Boolean strings to search the internet for complaints about my compnay and our sister brands, all references work, the code below works (On occasions) too! but it isn't consistent!
Any help would be more than welcome!!
I have come stuck on this, I keep getting a cross site scripting error or and automation error, I must be missing something, but quite honestly I don't know where to look anymore!! - Any help would be great!
I have created a series of Boolean strings to search the internet for complaints about my compnay and our sister brands, all references work, the code below works (On occasions) too! but it isn't consistent!
Code:
'Set Dimensions
Dim lLR As Long ' Last used Row
Dim rCell As Range ' Cells in Range
Dim strSearch As String ' Search String
Dim MyDate As String ' Date
Dim CreamEgg As String ' Active Screen namde
'Set active Sheet
CreamEgg = ActiveSheet.Name
Sheets("Search Sheet").Activate
lLR = Sheets("Search Sheet").Range("B65536").End(xlUp).Row
' Formate Date
MyDate = Date
'Set lLR (LastRow)
Sheets(CreamEgg).Activate
'Set rCell range (MyRange)
Range("B11:B" & lLR).Name = "MyRange"
'Start Loop
For Each rCell In Range("MyRange")
'Obtain Cell Values
strSearch = rCell.Value
'Search Google
ThisWorkbook.FollowHyperlink "[URL="http://www.google.co.uk/search?q"]Google[/URL]=" & strSearch
'google.co.uk/search?q=" & strSearch
'Add Date
rCell.Offset(, 2).Value = MyDate
'End Loop
Next rCell
End Sub
Any help would be more than welcome!!