View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
moonhk moonhk is offline
external usenet poster
 
Posts: 62
Default How to pass text to web page ?

Thank you,
Just understand Tom meaning. Just input the post string after then
url.

NickHK wrote:
As Tom indicated in your previous post, all this may be unnecessary if the
passing the criteria in the URL is supported.
If you perform a search on Yahoo for the words "Excel" and "help", you will
see that the URL you actually send to the Yahoo server is :
http://search.yahoo.com/search?ei=UT...l+help&x=0&y=0

So you can build that string yourself and .Navigate directly. Forget the
rest.

NickHK

"moonhk" wrote in message
ups.com...
How to pass text to web page search box ?

How to Set obj = ie.Document.all.Item("???")

Option Explicit
Sub Testing_1()
Dim ie As InternetExplorer
Dim obj As Object
'~~ Prepare to open the web page
Set ie = New InternetExplorer
With ie
.Visible = True
.Navigate "http://www.yahoo.com/"
End With

'~~ loop until the page is fully loaded
With ie
Do Until Not .Busy
DoEvents
Loop
End With
Set obj = ie.Document.all.Item("searchlabel")
If Not obj Is Nothing Then
obj.Value = "Testing"
End If

Set ie = Nothing
MsgBox "Done"
End Sub