VBA - Search Google

QandAdam

New Member
Joined
Jan 12, 2019
Messages
30
I have the following code which triggers when the user double clicks on a field:

Code:
[/COLOR][COLOR=#000000]Application.FollowHyperLink "http://www.google.co.uk/search?q=" & BusinessName[/COLOR][COLOR=#333333]

This works fairly well and opens Google to search for the value in the BusinessName field. However, some Businesses contain "&" - which causes issues... The Google search only returns the text prior to the "&". Is there a way to include all of the field?

E.g.
Business Name = Jack & Jones
Google Search = Jack
 

Some videos you may like

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Watch MrExcel Video

Forum statistics

Threads
1,096,410
Messages
5,450,265
Members
405,599
Latest member
capcomdevil

This Week's Hot Topics

Top