<?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: Programming Excel 2007 and Excel 2010 AutoShapes with VBA (Guest Post)</title>
	<atom:link href="http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Thu, 09 Sep 2010 16:13:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Data Visualization: How (2 of 2) &#124; cazh1</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-37931</link>
		<dc:creator>Data Visualization: How (2 of 2) &#124; cazh1</dc:creator>
		<pubDate>Mon, 02 Aug 2010 01:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-37931</guid>
		<description>[...] Excel comes with an ever growing list of graph types. Can&#8217;t find the one you want? Try to hack at the standard stuff using [...]</description>
		<content:encoded><![CDATA[<p>[...] Excel comes with an ever growing list of graph types. Can&#8217;t find the one you want? Try to hack at the standard stuff using [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-26168</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sat, 30 Jan 2010 13:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-26168</guid>
		<description>Jumpjack -

The &quot;old fashioned menu&quot; add-in is like many others, which mimic the old menu arrangement as best they can, assuming the old features are still available. The &quot;drawing recorder&quot; is just not available in 2007. It has not just been disabled, it was not (yet) written for the new generation of shapes.</description>
		<content:encoded><![CDATA[<p>Jumpjack -</p>
<p>The &#8220;old fashioned menu&#8221; add-in is like many others, which mimic the old menu arrangement as best they can, assuming the old features are still available. The &#8220;drawing recorder&#8221; is just not available in 2007. It has not just been disabled, it was not (yet) written for the new generation of shapes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jumpjack</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-26142</link>
		<dc:creator>jumpjack</dc:creator>
		<pubDate>Fri, 29 Jan 2010 21:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-26142</guid>
		<description>great article, thanks for helping working around MS dumbness...

I know about an excel add-on to get back the old-fashioned menu ( http://www.ubit.ch/software/ubitmenu-languages/ ), I wonder if also getting back &quot;drawing recorder&quot; would be possibile (maybe it&#039;s just there but disabled, like menu?)</description>
		<content:encoded><![CDATA[<p>great article, thanks for helping working around MS dumbness&#8230;</p>
<p>I know about an excel add-on to get back the old-fashioned menu ( <a href="http://www.ubit.ch/software/ubitmenu-languages/" rel="nofollow">http://www.ubit.ch/software/ubitmenu-languages/</a> ), I wonder if also getting back &#8220;drawing recorder&#8221; would be possibile (maybe it&#8217;s just there but disabled, like menu?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-26029</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Tue, 26 Jan 2010 17:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-26029</guid>
		<description>Thank you soo much for this article. I have been searching and searching for some tips on working with drawing objects (because my usual record macro method wasn&#039;t working) and this article explained how to do everything that, so far, I think I need to do to complete my project :)</description>
		<content:encoded><![CDATA[<p>Thank you soo much for this article. I have been searching and searching for some tips on working with drawing objects (because my usual record macro method wasn&#8217;t working) and this article explained how to do everything that, so far, I think I need to do to complete my project :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25849</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 22 Jan 2010 18:53:23 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25849</guid>
		<description>Trying to program a flow chart generator goes beyond the scope of this post and its comments. Before spending too much time, search Google for &#039;excel vba flow chart&#039;, and you&#039;ll see a lot of information from people who have already invented that wheel.</description>
		<content:encoded><![CDATA[<p>Trying to program a flow chart generator goes beyond the scope of this post and its comments. Before spending too much time, search Google for &#8216;excel vba flow chart&#8217;, and you&#8217;ll see a lot of information from people who have already invented that wheel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prerna</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25836</link>
		<dc:creator>Prerna</dc:creator>
		<pubDate>Fri, 22 Jan 2010 16:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25836</guid>
		<description>Hi Jon,

The above tabular column which is the input didnt come properly in the post. I have emailed you the same @ jonxlmvp@peltiertech.com</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>The above tabular column which is the input didnt come properly in the post. I have emailed you the same @ <a href="mailto:jonxlmvp@peltiertech.com">jonxlmvp@peltiertech.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prerna</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25835</link>
		<dc:creator>Prerna</dc:creator>
		<pubDate>Fri, 22 Jan 2010 16:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25835</guid>
		<description>Yes, Flow is the worksheet where I am trying to create a flow diagram in the excel using this macro. 

Table -&gt; the worksheet which has the input in the below format:

Job name    triggered by  Job      triggered job
in colmn A    in Colmn D                in colmn F
  
A                                                   B
B                      A                           C
                                                     D
D                      B                           E

above is an example input. Here Job A triggers Job B. Job B triggers C and D. D triggers job E. I am trying to create a Job flow diagram using shapes and I am stuck at the second job where B is triggering 2 jobs C and D where it involves to create 2 branches.

Appreciate your help on this Jon!!

Thanks again.</description>
		<content:encoded><![CDATA[<p>Yes, Flow is the worksheet where I am trying to create a flow diagram in the excel using this macro. </p>
<p>Table -&gt; the worksheet which has the input in the below format:</p>
<p>Job name    triggered by  Job      triggered job<br />
in colmn A    in Colmn D                in colmn F</p>
<p>A                                                   B<br />
B                      A                           C<br />
                                                     D<br />
D                      B                           E</p>
<p>above is an example input. Here Job A triggers Job B. Job B triggers C and D. D triggers job E. I am trying to create a Job flow diagram using shapes and I am stuck at the second job where B is triggering 2 jobs C and D where it involves to create 2 branches.</p>
<p>Appreciate your help on this Jon!!</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25824</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 22 Jan 2010 12:46:03 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25824</guid>
		<description>What&#039;s &quot;Flow&quot;? Is it the sheet where you want the shapes drawn? How does the program understand this?

In the modified calling sub (below), I construct a range address that includes the worksheet name, and in the function I determine the range, and use the parent of this range (the worksheet that the range is on) as the locaton of the added shape.

&lt;pre class=&quot;smallvba&quot;&gt;&lt;code&gt;Sub Something()&lt;br /&gt;  Dim i As Long&lt;br /&gt;  Dim job_name As Variant&lt;br /&gt;  Dim triby_job As Variant&lt;br /&gt;   Dim trigjobname_array(2 To 5) As Variant&lt;br /&gt;  Dim job_address As String&lt;br /&gt;  Dim oShape1 As Shape&lt;br /&gt;  Dim wsData As Worksheet&lt;br /&gt;  Dim wsShapes As Worksheet&lt;br /&gt;&#160;&lt;br /&gt;  Set wsData = Worksheets(&quot;Data Sheet&quot;)&lt;br /&gt;  Set wsShapes = Worksheets(&quot;Shapes&quot;)&lt;br /&gt;&#160;&lt;br /&gt;  For i = 2 To 5&lt;br /&gt;    job_address = &quot;&#039;&quot; &amp; wsShapes.Name &amp; &quot;&#039;!B&quot; &amp; 3 + (i - 2) * 3 &amp; &quot;:D&quot; &amp; 5 + (i - 2) * 3&lt;br /&gt;    job_name = wsData.Range(&quot;A&quot; &amp; i).Value&lt;br /&gt;    triby_job = wsData.Range(&quot;D&quot; &amp; i).Value&lt;br /&gt;    trigjobname_array(i) = wsData.Range(&quot;F&quot; &amp; i).Value&lt;br /&gt;    Set oShape1 = AddShapeToRange(msoShapeFlowchartAlternateProcess, job_address)&lt;br /&gt;  Next&lt;br /&gt;End Sub&lt;br /&gt;&#160;&lt;br /&gt;Private Function AddShapeToRange(ShapeType As MsoAutoShapeType, _&lt;br /&gt;    sAddress As String) As Shape&lt;br /&gt;  With Range(sAddress)&lt;br /&gt;    Set AddShapeToRange = .Parent.Shapes.AddShape(ShapeType, .Left, .Top, .Width, .Height)&lt;br /&gt;  End With&lt;br /&gt;End Function&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>What&#8217;s &#8220;Flow&#8221;? Is it the sheet where you want the shapes drawn? How does the program understand this?</p>
<p>In the modified calling sub (below), I construct a range address that includes the worksheet name, and in the function I determine the range, and use the parent of this range (the worksheet that the range is on) as the locaton of the added shape.</p>
<pre class="smallvba"><code>Sub Something()  Dim i As Long  Dim job_name As Variant  Dim triby_job As Variant   Dim trigjobname_array(2 To 5) As Variant  Dim job_address As String  Dim oShape1 As Shape  Dim wsData As Worksheet  Dim wsShapes As Worksheet&nbsp;  Set wsData = Worksheets("Data Sheet")  Set wsShapes = Worksheets("Shapes")&nbsp;  For i = 2 To 5    job_address = "'" &#038; wsShapes.Name &#038; "'!B" &#038; 3 + (i - 2) * 3 &#038; ":D" &#038; 5 + (i - 2) * 3    job_name = wsData.Range("A" &#038; i).Value    triby_job = wsData.Range("D" &#038; i).Value    trigjobname_array(i) = wsData.Range("F" &#038; i).Value    Set oShape1 = AddShapeToRange(msoShapeFlowchartAlternateProcess, job_address)  NextEnd Sub&nbsp;Private Function AddShapeToRange(ShapeType As MsoAutoShapeType, _    sAddress As String) As Shape  With Range(sAddress)    Set AddShapeToRange = .Parent.Shapes.AddShape(ShapeType, .Left, .Top, .Width, .Height)  End WithEnd Function</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prerna</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25821</link>
		<dc:creator>Prerna</dc:creator>
		<pubDate>Fri, 22 Jan 2010 12:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25821</guid>
		<description>Trying to use the below code:

Set oShape1 = AddShapeToRange(msoShapeFlowchartProcess, &quot;B3:D5&quot;)
    AddFormattedTextToShape oShape1, &quot;Job 1&quot;
    
    Set oShape2 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &quot;B9:D11&quot;)
    AddFormattedTextToShape oShape2, &quot;Job 2&quot;
    
    Set oShape3 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &quot;B16:D18&quot;)
    AddFormattedTextToShape oShape3, &quot;Job 3&quot;

The problem here is we are hardcoding the number of shapes we want which is 3 here and hence the range like B3:D5, B9:D11,B16:D18.

What I am trying to do is put this in a For loop and repeat it n number of times. So obviously I cannot hard code the ranges and want to give something dynamic.

    For i = 2 To 5
        job_name = Range(&quot;A&quot; &amp; i).Value
        triby_job = Range(&quot;D&quot; &amp; i).Value
        trigjobname_array(i) = Cells(i, &quot;F&quot;).Value
           Set oShape1 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &quot;B3:D5&quot;)
           AddFormattedTextToShape oShape1, Range(&quot;A&quot; &amp; i).Value
    Next
End Sub
Private Function AddShapeToRange(ShapeType As MsoAutoShapeType, _
                                 sAddress As String) As Shape
    With Flow.Range(sAddress)
        Set AddShapeToRange = Flow.Shapes.AddShape(ShapeType, .Left, .Top, .Width, .Height)
    End With
End Function

I am getting error at line &quot;With Flow.Range(sAddress)&quot;. 
Run time error 91 object variable or with block not set.

Can you please suggest something so that the set shape statement can be executed in a loop?</description>
		<content:encoded><![CDATA[<p>Trying to use the below code:</p>
<p>Set oShape1 = AddShapeToRange(msoShapeFlowchartProcess, &#8220;B3:D5&#8243;)<br />
    AddFormattedTextToShape oShape1, &#8220;Job 1&#8243;</p>
<p>    Set oShape2 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &#8220;B9:D11&#8243;)<br />
    AddFormattedTextToShape oShape2, &#8220;Job 2&#8243;</p>
<p>    Set oShape3 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &#8220;B16:D18&#8243;)<br />
    AddFormattedTextToShape oShape3, &#8220;Job 3&#8243;</p>
<p>The problem here is we are hardcoding the number of shapes we want which is 3 here and hence the range like B3:D5, B9:D11,B16:D18.</p>
<p>What I am trying to do is put this in a For loop and repeat it n number of times. So obviously I cannot hard code the ranges and want to give something dynamic.</p>
<p>    For i = 2 To 5<br />
        job_name = Range(&#8220;A&#8221; &amp; i).Value<br />
        triby_job = Range(&#8220;D&#8221; &amp; i).Value<br />
        trigjobname_array(i) = Cells(i, &#8220;F&#8221;).Value<br />
           Set oShape1 = AddShapeToRange(msoShapeFlowchartAlternateProcess, &#8220;B3:D5&#8243;)<br />
           AddFormattedTextToShape oShape1, Range(&#8220;A&#8221; &amp; i).Value<br />
    Next<br />
End Sub<br />
Private Function AddShapeToRange(ShapeType As MsoAutoShapeType, _<br />
                                 sAddress As String) As Shape<br />
    With Flow.Range(sAddress)<br />
        Set AddShapeToRange = Flow.Shapes.AddShape(ShapeType, .Left, .Top, .Width, .Height)<br />
    End With<br />
End Function</p>
<p>I am getting error at line &#8220;With Flow.Range(sAddress)&#8221;.<br />
Run time error 91 object variable or with block not set.</p>
<p>Can you please suggest something so that the set shape statement can be executed in a loop?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/comment-page-1/#comment-25818</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 22 Jan 2010 11:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892#comment-25818</guid>
		<description>Which line produces an error? What is the error? Is the active sheet a worksheet?

You can send any address to this function.</description>
		<content:encoded><![CDATA[<p>Which line produces an error? What is the error? Is the active sheet a worksheet?</p>
<p>You can send any address to this function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
