<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Getting Information From the Web Using Excel VBA</title>
	<atom:link href="http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/</link>
	<description>Musings in technology, philosophy, and all things guj</description>
	<lastBuildDate>Wed, 04 Nov 2009 18:12:49 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: J. D. Palmer</title>
		<link>http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/#comment-63</link>
		<dc:creator>J. D. Palmer</dc:creator>
		<pubDate>Tue, 08 Jul 2008 12:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://guj800.wordpress.com/?p=36#comment-63</guid>
		<description>@JP, @Al, thank you for your input.  I have changed the code in the post per your suggestions.

@Al, you were right about the variable mismatch, but the function still will not work from my office computer.  It just exits the function after reaching the line &quot;Set inet1 = New Inet&quot;.  They lock these computers down pretty hard, so it may be a user restriction, or it could be a firewall issue.  As you know, the part that you found different on the Brittish msn site did not post, and I am interested to know the difference.  If you would be so kind as to repost, you can get the html string to post as text - rather than hypertext - by using { } instead of &lt; &gt;.  It will not be a literal representation, but we will get the point.</description>
		<content:encoded><![CDATA[<p>@JP, @Al, thank you for your input.  I have changed the code in the post per your suggestions.</p>
<p>@Al, you were right about the variable mismatch, but the function still will not work from my office computer.  It just exits the function after reaching the line &#8220;Set inet1 = New Inet&#8221;.  They lock these computers down pretty hard, so it may be a user restriction, or it could be a firewall issue.  As you know, the part that you found different on the Brittish msn site did not post, and I am interested to know the difference.  If you would be so kind as to repost, you can get the html string to post as text &#8211; rather than hypertext &#8211; by using { } instead of &lt; &gt;.  It will not be a literal representation, but we will get the point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/#comment-60</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Tue, 08 Jul 2008 09:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://guj800.wordpress.com/?p=36#comment-60</guid>
		<description>Hi J.D.

You&#039;ve mixed your variables a little - creating myhttp but using mypage in your inStr()

Also, they may have changed the site or it&#039;s different for Brits:&quot;&quot;
works for me:

Function Temp(strCity As String)
strCity = Replace(strCity, &quot;,&quot;, &quot;&amp;2C+&quot;)

Dim myURL As String
myURL = &quot;http://search.msn.com/results.aspx?q=current+temperature+&quot; &amp; strCity

Dim inet1 As Inet
Dim myhttp As String

Set inet1 = New Inet
With inet1
    .Protocol = icHTTP
    .URL = myURL
    myhttp = .OpenURL(.URL, icString)
End With
Set inet1 = Nothing

Dim intStart As Integer, intEnd As Integer
intStart = InStr(myhttp, &quot;&quot;) + 39
intEnd = InStr(intStart, myhttp, &quot;&amp;&quot;)

Temp = Mid(myhttp, intStart, (intEnd - intStart))
    
End Function</description>
		<content:encoded><![CDATA[<p>Hi J.D.</p>
<p>You&#8217;ve mixed your variables a little &#8211; creating myhttp but using mypage in your inStr()</p>
<p>Also, they may have changed the site or it&#8217;s different for Brits:&#8221;"<br />
works for me:</p>
<p>Function Temp(strCity As String)<br />
strCity = Replace(strCity, &#8220;,&#8221;, &#8220;&amp;2C+&#8221;)</p>
<p>Dim myURL As String<br />
myURL = &#8220;http://search.msn.com/results.aspx?q=current+temperature+&#8221; &amp; strCity</p>
<p>Dim inet1 As Inet<br />
Dim myhttp As String</p>
<p>Set inet1 = New Inet<br />
With inet1<br />
    .Protocol = icHTTP<br />
    .URL = myURL<br />
    myhttp = .OpenURL(.URL, icString)<br />
End With<br />
Set inet1 = Nothing</p>
<p>Dim intStart As Integer, intEnd As Integer<br />
intStart = InStr(myhttp, &#8220;&#8221;) + 39<br />
intEnd = InStr(intStart, myhttp, &#8220;&amp;&#8221;)</p>
<p>Temp = Mid(myhttp, intStart, (intEnd &#8211; intStart))</p>
<p>End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Getting Information From the Web Using Excel VBA - Learn Excel</title>
		<link>http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/#comment-59</link>
		<dc:creator>Getting Information From the Web Using Excel VBA - Learn Excel</dc:creator>
		<pubDate>Sun, 06 Jul 2008 21:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://guj800.wordpress.com/?p=36#comment-59</guid>
		<description>[...] Original post by J. D. Palmer [...]</description>
		<content:encoded><![CDATA[<p>[...] Original post by J. D. Palmer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://guj800.wordpress.com/2008/06/30/getting-information-from-the-web-using-excel-vba/#comment-58</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Fri, 04 Jul 2008 14:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://guj800.wordpress.com/?p=36#comment-58</guid>
		<description>Hey JD, I noticed the following line of code:

Dim intStart, intEnd As Integer

This is translated by VBA as

Dim intStart As Variant, intEnd As Integer

You probably meant

Dim intStart As Integer, intEnd As Integer

You can share a &#039;Dim&#039; statement but not a declaration.

HTH,
JP</description>
		<content:encoded><![CDATA[<p>Hey JD, I noticed the following line of code:</p>
<p>Dim intStart, intEnd As Integer</p>
<p>This is translated by VBA as</p>
<p>Dim intStart As Variant, intEnd As Integer</p>
<p>You probably meant</p>
<p>Dim intStart As Integer, intEnd As Integer</p>
<p>You can share a &#8216;Dim&#8217; statement but not a declaration.</p>
<p>HTH,<br />
JP</p>
]]></content:encoded>
	</item>
</channel>
</rss>
