Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See Ron de Bruin's site:
http://www.rondebruin.nl/Google.htm -- Regards, Tom Ogilvy "John" wrote in message ... Hi there, I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Thanks for this. Looks very interesting, but I was hoping to use it on my own command button so that the user does have to type in the text that's already there. Any clues? Thanks again John "Tom Ogilvy" wrote in message ... See Ron de Bruin's site: http://www.rondebruin.nl/Google.htm -- Regards, Tom Ogilvy "John" wrote in message ... Hi there, I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Private Sub CommandButton1_Click() ActiveWorkbook.FollowHyperlink _ "http://www.google.com/search?hl=en&q=" & _ Replace$(Me.TextBox1.Text, " ", "+") End Sub Refine this coding by scrutinizing your manual Google searches' returning url's, using quotes, domain restricted searches, ... HTH. Best wishes Harald "John" skrev i melding ... Hi there, I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great. Thanks Harald, this works perfectly.
Thanks also Tom for Ron's email. Best regards John "Harald Staff" wrote in message ... Hi John Private Sub CommandButton1_Click() ActiveWorkbook.FollowHyperlink _ "http://www.google.com/search?hl=en&q=" & _ Replace$(Me.TextBox1.Text, " ", "+") End Sub Refine this coding by scrutinizing your manual Google searches' returning url's, using quotes, domain restricted searches, ... HTH. Best wishes Harald "John" skrev i melding ... Hi there, I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
....and for anyone who's interested the following includes some of the Google
converted symbols: Private Sub cmdGoogle_Click() Dim sSearchText As String 'Set search string sSearchText = Me.lstBox1.Text 'Replace double quotes with Google equivilent sSearchText = Replace$(sSearchText, Chr(34), "%22") 'Replace single quotes with Google equivilent sSearchText = Replace$(sSearchText, Chr(39), "%27") 'Replace left bracket with Google equivilent sSearchText = Replace$(sSearchText, Chr(40), "%28") 'Replace right bracket with Google equivilent sSearchText = Replace$(sSearchText, Chr(41), "%29") 'Replace spaces with Google equivilent sSearchText = Replace$(sSearchText, " ", "+") ActiveWorkbook.FollowHyperlink _ "http://www.google.co.uk/search?hl=en&q=" & _ sSearchText End Sub Thanks again Harald and Tom. "John" wrote in message ... Great. Thanks Harald, this works perfectly. Thanks also Tom for Ron's email. Best regards John "Harald Staff" wrote in message ... Hi John Private Sub CommandButton1_Click() ActiveWorkbook.FollowHyperlink _ "http://www.google.com/search?hl=en&q=" & _ Replace$(Me.TextBox1.Text, " ", "+") End Sub Refine this coding by scrutinizing your manual Google searches' returning url's, using quotes, domain restricted searches, ... HTH. Best wishes Harald "John" skrev i melding ... Hi there, I've got a user form which I'm using to check against a list of names. What I'd like to do is to assign a (Google) search to a command button, with the search words based on the text in a textbox. Can anyone point me in the right direction? (The button just needs to activate Internet Explorer with Google and the search results.) Thanks John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
O.T. Google Search | Excel Discussion (Misc queries) | |||
Google search box on excel | Excel Worksheet Functions | |||
Google Search Add-in update | Excel Programming | |||
Google search from excel | Excel Programming | |||
Google Search 6.0 | Excel Programming |