pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
Hi,
For now it opens the site but it does not enter the word to search.
There is no error message as such. I did not use sendkey{TAB} sendkey {%tab} because google set focus on search field when
we open the site...
Please advice on how to copy range("A1")value to google and hit enter.
Thank you so much in advance.
Pedie
For now it opens the site but it does not enter the word to search.
There is no error message as such. I did not use sendkey{TAB} sendkey {%tab} because google set focus on search field when
we open the site...
Please advice on how to copy range("A1")value to google and hit enter.
Thank you so much in advance.
Pedie
Code:
Sub try()
Dim ie As InternetExplorer
Dim MyStr As String
Set ie = New InternetExplorer
ie.Navigate "[URL="http://google.com/"]http://google.com[/URL]"
ie.Visible = True
Application.Wait Now + TimeValue("00:00:01")
SendKeys "%{tab}"
sheet1.Range("A1").Copy
SendKeys "%{tab}"
SendKeys "{tab}"
Application.SendKeys ("^v")
Application.SendKeys "%{Enter}"
End Sub