Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass text to web page ?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass text to web page ?
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass text to web page ?
Hi NickHK
Below is www.ibm.com, part of html how to get/set value into name="q" ? <form title="Search form" name="search-form" method="get" action="http://www.ibm.com/Search/" <table cellspacing="0" cellpadding="0" border="0" <tr <td width="1"<label for="q"<img alt="Search for:" height="1" width="1" src="//www.ibm.com/i/c.gif" /</label</td <td align="right"<input value="ERIC" type="text" size="15" name="q" maxlength="100" id="q" class="input" /</td <td width="7" <input type="hidden" name="v" value="14" /<input type="hidden" name="lang" value="en" /<input type="hidden" name="cc" value="us" /<input type="hidden" name="en" value="utf" /</td <td<input value="Search" type="image" src="//www.ibm.com/i/v14/t/us/en/search.gif" name="Search" alt="Search" /</td <td width="20" </td </tr </table </form 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass text to web page ?
If you enter "some text" (without the ") in the search box and click Search,
you will see that the actual URL sent to the server is : http://www.ibm.com/Search/?q=some+te...0 &Search.y=6 So build your own similar string and use that for the URL. NickHK "moonhk" wrote in message ups.com... Hi NickHK Below is www.ibm.com, part of html how to get/set value into name="q" ? <form title="Search form" name="search-form" method="get" action="http://www.ibm.com/Search/" <table cellspacing="0" cellpadding="0" border="0" <tr <td width="1"<label for="q"<img alt="Search for:" height="1" width="1" src="//www.ibm.com/i/c.gif" /</label</td <td align="right"<input value="ERIC" type="text" size="15" name="q" maxlength="100" id="q" class="input" /</td <td width="7" <input type="hidden" name="v" value="14" /<input type="hidden" name="lang" value="en" /<input type="hidden" name="cc" value="us" /<input type="hidden" name="en" value="utf" /</td <td<input value="Search" type="image" src="//www.ibm.com/i/v14/t/us/en/search.gif" name="Search" alt="Search" /</td <td width="20" </td </tr </table </form 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Graphing Text: Pass or Fail | Charts and Charting in Excel | |||
Want to dump text written on page 1 to page 2 in excel | Excel Worksheet Functions | |||
Pass text 255 char. to closed wkb with SQL? | Excel Programming | |||
Putting Page Number in last page text | Excel Programming | |||
How do I pass info from excel to a hyperlinked explorer page | Excel Programming |