Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Search Google from Textbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Search Google from Textbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Search Google from Textbox

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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Search Google from Textbox



Send him an email and ask for some sample code.

--
Regards,
Tom Ogilvy


"John" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Search Google from Textbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Search Google from Textbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Search Google from Textbox

....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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
O.T. Google Search RagDyeR Excel Discussion (Misc queries) 4 May 12th 09 11:26 PM
Google search box on excel Dileep Chandran Excel Worksheet Functions 7 November 10th 06 04:14 AM
Google Search Add-in update Ron de Bruin Excel Programming 1 November 19th 04 10:54 PM
Google search from excel Ant[_5_] Excel Programming 1 August 31st 04 08:46 PM
Google Search 6.0 Ron de Bruin Excel Programming 11 January 2nd 04 09:57 PM


All times are GMT +1. The time now is 04:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"