<?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/"
		>
<channel>
	<title>Comments on: Adding Comments</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Steve</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-25822</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 23 Jul 2007 03:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-25822</guid>
		<description>&lt;p&gt;Have an excel spreadsheet connected to my stock account.  The spread sheet receives DDE feed for prices, quantities etc..  Well long story short, I wanted to have a running total of 4 cells in excel as they received DDE data.  I tried a private sub macro but had to put it into the VBA code for the sheet and it would only work for one cell, it is below:&lt;/p&gt;
&lt;p&gt;Private Sub Worksheet_Change(ByVal Target As Excel.Range)&lt;br&gt;
    If Intersect(Target, Range(&quot;V72?)) Is Nothing Then Exit Sub&lt;br&gt;
    With Range(&quot;V82?)&lt;br&gt;
        .value = .value + [V72]&lt;br&gt;
    End With&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;So I tried a macro from the Microsoft website which keeps a running total in the comment section of a cell.  It works but when I use an &#039;if&#039; statement to load the comment from the DDE fed cell to the cell with the comment macro, the value goes into the cell but not into the comment, and so no running total in the comment.&lt;/p&gt;
&lt;p&gt;My Question is this - Is there some way to  make my macro above  work with more than one cell?  And if that is  negative, is there a way to feed the data from the DDE cell to the cell with the running total going into the comment section?  Any advice would be appreciated.  Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Have an excel spreadsheet connected to my stock account.  The spread sheet receives DDE feed for prices, quantities etc..  Well long story short, I wanted to have a running total of 4 cells in excel as they received DDE data.  I tried a private sub macro but had to put it into the VBA code for the sheet and it would only work for one cell, it is below:</p>
<p>Private Sub Worksheet_Change(ByVal Target As Excel.Range)<br />
    If Intersect(Target, Range(&#8220;V72?)) Is Nothing Then Exit Sub<br />
    With Range(&#8220;V82?)<br />
        .value = .value + [V72]<br />
    End With<br />
End Sub</p>
<p>So I tried a macro from the Microsoft website which keeps a running total in the comment section of a cell.  It works but when I use an &#8216;if&#8217; statement to load the comment from the DDE fed cell to the cell with the comment macro, the value goes into the cell but not into the comment, and so no running total in the comment.</p>
<p>My Question is this &#8211; Is there some way to  make my macro above  work with more than one cell?  And if that is  negative, is there a way to feed the data from the DDE cell to the cell with the running total going into the comment section?  Any advice would be appreciated.  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Pope</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-15689</link>
		<dc:creator>Andy Pope</dc:creator>
		<pubDate>Thu, 11 Aug 2005 14:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-15689</guid>
		<description>&lt;p&gt;Kos,&lt;/p&gt;
&lt;p&gt;Something like this.&lt;br&gt;
Note: requires an existing chartobject on the activesheet.&lt;br&gt;
Sub GraphComment()&lt;/p&gt;
&lt;p&gt;    Dim cmtTemp As Comment&lt;br&gt;
    Dim chtTemp As Chart&lt;br&gt;
    Dim strFilename As String&lt;/p&gt;
&lt;p&gt;    Set cmtTemp = ActiveCell.Comment&lt;br&gt;
    If cmtTemp Is Nothing Then&lt;br&gt;
        Set cmtTemp = ActiveCell.AddComment&lt;br&gt;
    End If&lt;/p&gt;
&lt;p&gt;    strFilename = ThisWorkbook.Path &amp; &quot;z&quot; &amp; _&lt;br&gt;
        Format$(CLng(Rnd() * 100000), &quot;000000?) &amp; &quot;.gif&quot;&lt;/p&gt;
&lt;p&gt;    Set chtTemp = ActiveSheet.ChartObjects(1).Chart&lt;br&gt;
    chtTemp.Export strFilename&lt;/p&gt;
&lt;p&gt;    cmtTemp.Shape.Fill.UserPicture strFilename&lt;/p&gt;
&lt;p&gt;    Kill strFilename&lt;/p&gt;
&lt;p&gt;    Set cmtTemp = Nothing&lt;br&gt;
    Set chtTemp = Nothing&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Cheers&lt;br&gt;
Andy&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Kos,</p>
<p>Something like this.<br />
Note: requires an existing chartobject on the activesheet.<br />
Sub GraphComment()</p>
<p>    Dim cmtTemp As Comment<br />
    Dim chtTemp As Chart<br />
    Dim strFilename As String</p>
<p>    Set cmtTemp = ActiveCell.Comment<br />
    If cmtTemp Is Nothing Then<br />
        Set cmtTemp = ActiveCell.AddComment<br />
    End If</p>
<p>    strFilename = ThisWorkbook.Path &amp; &#8220;z&#8221; &amp; _<br />
        Format$(CLng(Rnd() * 100000), &#8220;000000?) &amp; &#8220;.gif&#8221;</p>
<p>    Set chtTemp = ActiveSheet.ChartObjects(1).Chart<br />
    chtTemp.Export strFilename</p>
<p>    cmtTemp.Shape.Fill.UserPicture strFilename</p>
<p>    Kill strFilename</p>
<p>    Set cmtTemp = Nothing<br />
    Set chtTemp = Nothing</p>
<p>End Sub</p>
<p>Cheers<br />
Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kos</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-15685</link>
		<dc:creator>kos</dc:creator>
		<pubDate>Thu, 11 Aug 2005 09:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-15685</guid>
		<description>&lt;p&gt;hi, is there a way to add graph or a pic to the Comment using VBA ??? am abel to add a graph using excel, but will like to put it using VBA ? &lt;/p&gt;
&lt;p&gt;can neone help ?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>hi, is there a way to add graph or a pic to the Comment using VBA ??? am abel to add a graph using excel, but will like to put it using VBA ? </p>
<p>can neone help ?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9514</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Fri, 18 Mar 2005 21:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9514</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;I haven&#039;t needed to recently.&lt;/p&gt;
&lt;p&gt;If I had to choose, I&#039;d use Line Input - just because My preference is to control import processes rather than let a helper make the assumptions.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>I haven&#8217;t needed to recently.</p>
<p>If I had to choose, I&#8217;d use Line Input &#8211; just because My preference is to control import processes rather than let a helper make the assumptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9512</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Fri, 18 Mar 2005 16:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9512</guid>
		<description>&lt;p&gt;Rob:  Do you have a preference?  I use Input for two columns or less and Line Input for four columns or more.  (Three columns depends on my mood.)  Certainly if the setup is such that you can loop through the array created by Split, it makes sense to use it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Rob:  Do you have a preference?  I use Input for two columns or less and Line Input for four columns or more.  (Three columns depends on my mood.)  Certainly if the setup is such that you can loop through the array created by Split, it makes sense to use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9511</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Fri, 18 Mar 2005 16:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9511</guid>
		<description>&lt;p&gt;Charlie:  It&#039;s pretty poor of me not to close the file.  I thought about the error checking and didn&#039;t use it because I assumed it would always go into a new workbook.  At the very least I should have disclosed that assumption, but really I should have put error handling around that.  Thanks for pointing those out.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Charlie:  It&#8217;s pretty poor of me not to close the file.  I thought about the error checking and didn&#8217;t use it because I assumed it would always go into a new workbook.  At the very least I should have disclosed that assumption, but really I should have put error handling around that.  Thanks for pointing those out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9508</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Fri, 18 Mar 2005 11:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9508</guid>
		<description>&lt;p&gt;Another approach using Line Input then using Split function.&lt;br&gt;
Split a function of Excel 2000 onward...&lt;/p&gt;
&lt;p&gt;    Dim arr() As String&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;    Do Until EOF(lFnum)&lt;br&gt;
        i = i + 1&lt;br&gt;
        Line Input #lFnum, sInput&lt;br&gt;
        arr = Split(sInput, &quot;,&quot;, 2)&lt;br&gt;
        Sheet1.Cells(i, 1).Value = arr(0)&lt;br&gt;
        Sheet1.Cells(i, 1).AddComment arr(1)&lt;br&gt;
    Loop&lt;/p&gt;
&lt;p&gt;    Close #lFnum&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Rob&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another approach using Line Input then using Split function.<br />
Split a function of Excel 2000 onward&#8230;</p>
<p>    Dim arr() As String</p>
<p>&#8230;</p>
<p>    Do Until EOF(lFnum)<br />
        i = i + 1<br />
        Line Input #lFnum, sInput<br />
        arr = Split(sInput, &#8220;,&#8221;, 2)<br />
        Sheet1.Cells(i, 1).Value = arr(0)<br />
        Sheet1.Cells(i, 1).AddComment arr(1)<br />
    Loop</p>
<p>    Close #lFnum</p>
<p>Cheers,<br />
Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charlie</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9507</link>
		<dc:creator>charlie</dc:creator>
		<pubDate>Fri, 18 Mar 2005 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9507</guid>
		<description>&lt;p&gt;One point - it&#039;s a good idea to close the file when you&#039;re done with it. For anyone who doesn&#039;t know, this is simplicity itself in VBA:&lt;/p&gt;
&lt;p&gt;&#039;close all open files&lt;br&gt;
Close&lt;/p&gt;
&lt;p&gt;OK two points - this one even pickier: using AddComment on a cell that already has a comment throws an error, so possibly a good idea to clear the output cells before running.&lt;/p&gt;
&lt;p&gt;I don&#039;t mean to be negative though - this is a good and  very clear example of how to read from a file.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One point &#8211; it&#8217;s a good idea to close the file when you&#8217;re done with it. For anyone who doesn&#8217;t know, this is simplicity itself in VBA:</p>
<p>&#8216;close all open files<br />
Close</p>
<p>OK two points &#8211; this one even pickier: using AddComment on a cell that already has a comment throws an error, so possibly a good idea to clear the output cells before running.</p>
<p>I don&#8217;t mean to be negative though &#8211; this is a good and  very clear example of how to read from a file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Bonneau</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/03/17/adding-comments/#comment-9490</link>
		<dc:creator>Paul Bonneau</dc:creator>
		<pubDate>Fri, 18 Mar 2005 01:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1059#comment-9490</guid>
		<description>&lt;p&gt;Thanks very much for putting this together, Dick. You just saved me and my associates a lot of work.&lt;/p&gt;
&lt;p&gt;You mention using a macro to transfer cell data into comments. I never did get that to work because the macro ended up with the data that went into the cell comment (during the record step) hard-coded in the macro, even though I was using cut and paste. Maybe it can be done by someone more skilled with Excel, or maybe I just need to update my copy.&lt;/p&gt;
&lt;p&gt;The above web site is where we will be using this fragment of code, for the 2005 session. Thanks again,&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks very much for putting this together, Dick. You just saved me and my associates a lot of work.</p>
<p>You mention using a macro to transfer cell data into comments. I never did get that to work because the macro ended up with the data that went into the cell comment (during the record step) hard-coded in the macro, even though I was using cut and paste. Maybe it can be done by someone more skilled with Excel, or maybe I just need to update my copy.</p>
<p>The above web site is where we will be using this fragment of code, for the 2005 session. Thanks again,</p>
<p>Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>

