VBA - FollowHyperlink help needed please!

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!

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!!
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top