<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peltier Tech Blog &#187; Guest Post</title>
	<atom:link href="http://peltiertech.com/WordPress/category/guest-post/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 16 May 2012 17:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Excel, Free Rice and MMA</title>
		<link>http://peltiertech.com/WordPress/excel-free-rice-and-mma/</link>
		<comments>http://peltiertech.com/WordPress/excel-free-rice-and-mma/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 07:00:31 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Guest Post]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3387</guid>
		<description><![CDATA[Today I&#8217;m happy to present a guest post by Dr. AnnMaria DeMars. AnnMaria is the intelligent and entertaining author of AnnMaria&#8217;s Blog about statistics, technology, and work and also of AnnMaria&#8217;s Blog on Judo, Business, and Life, which is about &#8220;achieving success in business, sports and academics [and parenting] without ever actually having grown up.&#8221; “If [...]]]></description>
			<content:encoded><![CDATA[<p><em>Today I&#8217;m happy to present a guest post by Dr. AnnMaria DeMars. AnnMaria is the intelligent and entertaining author of <a href="http://www.thejuliagroup.com/blog/" rel="nofollow" title="AnnMaria's Blog - The Julia Group" >AnnMaria&#8217;s Blog</a> about statistics, technology, and work and also of <a href="http://drannmaria.blogspot.com/" rel="nofollow" title="AnnMaria's Blog on Judo, Business, and Life" >AnnMaria&#8217;s Blog on Judo, Business, and Life</a>, which is about &#8220;achieving success in business, sports and academics [and parenting] without ever actually having grown up.&#8221; </em></p>
<p>“If all you have is a hammer, everything looks like a nail.”</p>
<p>Hard to believe Bernard Baruch died before computer graphics, because he hit the &#8211; um, nail &#8211; right on the head. Some days, it seems the world is comprised of people who fit into one of two categories &#8230;</p>
<ol>
<li>“Find Excel not sufficiently sophisticated for real statistics, don’t you agree?” (Said in the same tone as Thurston Howell III &#8211; look it up, youngsters!)</li>
<li>Believe every problem can be solved by Excel.</li>
</ol>
<p>What’s really interesting is that I fall into both of those categories, not just some of the time but almost every day. Let’s start with last week.  My darling daughter fought for the 135 lb world title on Saturday, and a few weeks ago, she started a free rice group. You can read a bit of the story at <a href="http://freerice.com/content-group/rondamma" rel="nofollow" title="RondaMMA Free Rice" >RondaMMA Free Rice</a>.  In a nutshell (or should I say grain of rice), this is a wonderful site where you can answer questions and for every one correctly answered, 10 grains of rice are devoted to the world food program. Ronda sent free t-shirts, autographed pictures and other swag to fans who were part of her free rice group. Below is one of three Excel charts I did to track the progress at different points in the competition.</p>
<p>Her fans have donated over 20,000,000 grains of rice so far, and God love them for that, but it is safe to conjecture that the average mixed martial arts fan is not a doctoral student in statistics so my challenge was to come up with easy to follow graphics for tracking the results. Even though I am usually using SAS or SPSS all day, I selected Excel for this chart for a couple of reasons. First, the free rice site allows me to download the group data in a .csv file each day, making it easy for me to open in Excel. Second, it is blissfully easy to insert a picture in an Excel chart.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/rice_grains.png" alt="Rice grains in a rice grains chart" width="577" height="369" /></p>
<p>Should you have your own Excel free rice group you want to chart (or anything similar) here are the steps.</p>
<p>1. Create your data. In my case this meant having one column with the dates and a second column with the number donated as of that day.</p>
<p>A.  Each day, I downloaded the csv file that had three columns, a userid (A), a username (B) and number of grains donated (C).  I computed the number for that day by entering into a cell =SUM(C2:CN) where N was however many group members had donated as of that day. This gives me the data for one day.</p>
<p>B. In my master file, type the date, copy the sum from the day’s file and use Paste Special to paste the value only.</p>
<p>2. Format the cells. I went to Format, then Cells, then Number and formatted the cells to have zero decimal places and a comma to separate 1,000.</p>
<p>3. Make the chart: Select the Date and Rice Grains columns. Click Charts and select the first option, which is an area chart.</p>
<p>4. Double-click on your chart and the FORMAT DATA SERIES window shows up. It has an option I have never used because I am a “Serious Academic” (Thurston Howell III accent again) and I don’t work for USA Today and insert pictures in my chart. Until now, when I click on the PICTURE tab and choose insert picture.  I also click on the option to TILE PICTURE AS TEXTURE.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/FormatDataSeriesDialog.png" alt="Format Data Series Dialog" width="353" height="260" /></p>
<p>Because it looks awfully plain with white rice and a white grid, I double-click on it again and choose FILL this time, changing the background color to a pale orange.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/FormatChartAreaDialog.png" alt="Format Chart Area Dialog" width="568" height="265" /></p>
<p>I click on the legend and delete it, because it really is superfluous, add a title, and I have the chart to post to track the contest.</p>
<p>One person asked, “It takes 3,500 grains of rice to fill one bowl. If you raise 1,000,000 grains it’s only fed less than 300 people. How much difference does that make?”</p>
<p>Ronda’s answer was, “If you’re one of those people, it makes a lot of difference to you.”</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/rondamma.jpg" alt="The Champ" width="158" height="312" /></p>
<p>As of now, the group has raised enough rice to give a meal to over 5,500 people who otherwise would have gone hungry.</p>
<p>You can see the fight at <a href="http://www.mmamania.com/2012/3/4/2843919/ronda-rousey-vs-miesha-tate-full-fight-video-highlights-showtime-online-mma" rel="nofollow" title="Ronda Rousey vs. Miesha Tate" >Ronda Rousey vs. Miesha Tate</a> &#8211; caution: graphic violence.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=2474005" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/pnp468_01.jpg" ALT="Create Excel dashboards quickly with Plug-N-Play reports." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=2474005" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/excel-free-rice-and-mma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Excel 2007 and Excel 2010 AutoShapes with VBA (Guest Post)</title>
		<link>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/</link>
		<comments>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 08:00:12 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Excel 2007]]></category>
		<category><![CDATA[Excel 2010]]></category>
		<category><![CDATA[shapes]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2892</guid>
		<description><![CDATA[Today I am pleased to present a guest post written by my colleague Nicholas Hebb. Nick appears online frequently, commenting on Excel-related blogs and corresponding in the various forums. Programming Excel 2007 and Excel 2010 AutoShapes with VBA By Nicholas Hebb With the release of Office 2007, Microsoft rewrote the drawing tools from the ground [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-left: 24px; margin-right: 30px;"><em>Today I am pleased to present a guest post written by my colleague Nicholas Hebb. Nick appears online frequently, commenting on Excel-related blogs and corresponding in the various forums. <br />
 </em></p>
<h2>Programming Excel 2007 and Excel 2010 AutoShapes with VBA</h2>
<p><em>By Nicholas Hebb</em></p>
<p>With the release of Office 2007, Microsoft rewrote the drawing tools from the ground up. On the plus side, this meant  new shapes, new styles, and the addition of SmartArt. On the downside, they didn&#8217;t have time to incorporate  AutoShape operations in their macro recorder prior to release. Thankfully, Excel 2010 has added macro support back, but  like all macros the code generated is often bloated and relies heavily on the  Selection object, which tends to hide the core objects in use. For the most part, the online help is good, but there is  some information that doesn&#8217;t get explained in detail. This article attempts to provide a basic overview of  working with AutoShapes using VBA and touch on some areas that are not covered extensively in the help documentation.</p>
<h3><span id="more-2892"></span>Definitions</h3>
<p>Two properties of the Shape object will be used in the code samples below &#8211; <tt class="tt">Shape.<em>Type</em></tt> and <tt class="tt">Shape.<em>AutoShapeType</em></tt>. Excel  has a broad range of shape Types consisting not only of AutoShapes, but also connectors, lines, pictures, charts, comments, and many other graphical items. For AutoShapes, the AutoShapeType property lets you get/set the type of shape as shown  in the gallery image below.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/autoshapes-gallery.png" alt="Excel 2010 Autoshapes Gallery" width="564" height="383" /></p>
<p>Knowing when to check the <tt class="tt">Shape.Type</tt> property versus the <tt class="tt">Shape.AutoShapeType</tt> is very useful. For example, if the AutoShapeType value is -2, then for all practical purposes the shape is not an AutoShape. If the value is greater than  1, then the shape is one of the types display in the Shapes gallery. The tricky part comes when the AutoShapeType is 1,  which equals the AutoShape constant <tt class="tt">msoShapeRectangle</tt>. It could be a Rectangle AutoShape, but it could also be anything  shaped like a rectangle, such as a text box, a comment, or even a picture. So if the AutoShapeType evaluates to 1, then you also need to check the Type property.</p>
<p>Callouts are another special type of shape that can cause confusion. They are discussed more in the Miscellaneous  Issues section below.</p>
<h3>Accessing a Shape Object</h3>
<p>Each worksheet contains a Shapes collection consisting of Shape objects. Like other collections in VBA, the Shape object is accessed either via  its name or index number, as in:</p>
<pre class="vbasmall"><code>ActiveSheet.Shapes("SHAPE_NAME")</code></pre>
<p>or</p>
<pre class="vbasmall"><code>ActiveSheet.Shapes(1)</code></pre>
<p>Or, using the For&#8230;Each syntax:</p>
<pre class="vbasmall"><code>Dim shp as Shape
For Each shp in ActiveSheet.Shapes
  MsgBox shp.Name
Next</code></pre>
<h3>Adding an AutoShape</h3>
<p>The syntax for adding a shape is:</p>
<pre class="vbasmall"><code>Worksheet.Shapes.AddShape(AutoShapeType, Left, Top, Width, Height)</code></pre>
<p>The AutoShapeType is a constant that ranges from 1 to 137 for Excel 2003 and earlier versions. Excel 2007 added  shapes 139 through 183. AutoShapeTypes 125-136 are special AutoShapes. The online help file states that they support  mouse over and click events, but that only applies when they are used in PowerPoint presentations. You can use them in  Excel but they don&#8217;t have any special properties.</p>
<p>To see what the AutoShapeType constant is for each AutoShape, you can copy and paste the following code into the Excel Visual Basic  Editor and run it (or download the sample file and run the macro). Not all the AutoShapes are available in the Shapes  gallery, so this will also give you a look at some of the hidden ones.</p>
<pre class="vbasmall"><code>Sub CreateAutoshapes()
  Dim i As Integer
  Dim t As Integer
  Dim shp As Shape

  t = 10
  For i = 1 To 137
    Set shp = ActiveSheet.Shapes.AddShape(i, 100, t, 60, 60)
    shp.TextFrame.Characters.Text = i
    t = t + 70
  Next
  <span style="color: #008000;">' skip 138 - not supported</span>
  If CInt(Application.Version) &gt;= 12 Then
    For i = 139 To 183
      Set shp = ActiveSheet.Shapes.AddShape(i, 100, t, 60, 60)
      shp.TextFrame.Characters.Text = i
      t = t + 70
    Next
  End If
End Sub</code></pre>
<p>The Left, Top, Width, and Height parameters of <tt class="tt">AddShape()</tt> are specified in points. The origin is the top left corner  of the worksheet, with the Left and Top values increasing to the right and down, respectively. Dealing with points on a  worksheet isn&#8217;t intuitive, so if you prefer you can add a shape to a given range address by using code like this:</p>
<pre class="vbasmall"><code>Function AddShapeToRange(ShapeType As MsoAutoShapeType, sAddress As String) As Shape
  With ActiveSheet.Range(sAddress)
    Set AddShapeToRange = ActiveSheet.Shapes.AddShape(ShapeType, _
        .Left, .Top, .Width, .Height)
  End With
End Function</code></pre>
<h3>Adding Text to an AutoShape</h3>
<p>The Shape object has both a TextFrame and TextFrame2 members. The TextFrame2 member was added in Excel 2007 and gives  better control over the formatting of the text. Because it is not backward compatible, I would recommend using the  TextFrame object, as shown in the following code.</p>
<pre class="vbasmall"><code>Sub AddFormattedTextToShape(oShape As Shape, sText As String)
  If Len(sText) &gt; 0 Then
    With oShape.TextFrame
      .Characters.Text = sText
      .Characters.Font.Name = "Garamond"
      .Characters.Font.Size = 12
      .HorizontalAlignment = xlHAlignCenter
      .VerticalAlignment = xlVAlignCenter
    End With
  End If
End Sub</code></pre>
<h3>Setting Border and Fill Styles</h3>
<p>If you take advantage of the built-in styles for Excel 2007 and Excel 2010, setting the AutoShape formatting is  ridiculously easy compared to Excel 2003 and previous versions. Excel 2007 introduced the ShapeStyle property with the 42 preset  styles shown below.</p>
<p>The style numbers can be set using a simple line of code:</p>
<pre class="vbasmall"><code><em>Shape</em>.ShapeStyle = msoShapeStylePreset<em>XX</em></code></pre>
<p>Where <tt class="tt"><em>Shape</em></tt> is the shape object and <tt class="tt"><em>XX</em></tt> is the style number. The style numbers are shown in the image gallery in order from left to right, top to bottom. For example, the red  button in the second row <tt class="tt">msoShapeStylePreset10</tt>).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/preset-styles.png" alt="" width="393" height="336" /></p>
<h3>Adding Connectors and Lines</h3>
<p>Connectors and lines are different objects in Excel. Connectors are special lines  that &#8220;connect&#8221; to shapes, and  if the shape is moved the connector stays connected and reroutes accordingly. Connectors cannot connect to other  connectors, but they can connect to the end point of a line.</p>
<p>The syntax for adding a line is straightforward:</p>
<pre class="vbasmall"><code>Worksheet.Shapes.AddLine(BeginX, BeginY, EndX, EndY)</code></pre>
<p>&#8230;with all coordinates as Singles. Adding a connector is a bit more complex, since you typically want it to connect  two shapes. The code below calculates the begin and end points, creates the connector, attaches the connector to the two  shapes, then finally does a reroute to ensure the shortest path.</p>
<pre class="vbasmall"><code>Function AddConnectorBetweenShapes(ConnectorType As MsoConnectorType, _
    oBeginShape As Shape, oEndShape As Shape) As Shape

  Const TOP_SIDE As Integer = 1
  Const BOTTOM_SIDE As Integer = 3
  Dim oConnector As Shape
  Dim x1 As Single
  Dim x2 As Single
  Dim y1 As Single
  Dim y2 As Single

  With  oBeginShape
    x1 = .Left + .Width / 2
    y1 = .Top + .Height
  End With
  With oEndShape
    x2 = .Left + .Width / 2
    y2 = .Top
  End With
  If CInt(Application.Version) &lt; 12 Then
    x2 = x2 - x1
    y2 = y2 - y1
  End If

  Set oConnector = ActiveSheet.Shapes.AddConnector(ConnectorType, x1, y1, x2, y2)
  oConnector.ConnectorFormat.BeginConnect oBeginShape, BOTTOM_SIDE
  oConnector.ConnectorFormat.EndConnect oEndShape, TOP_SIDE
  oConnector.RerouteConnections

  Set AddConnectorBetweenShapes = oConnector

  Set oConnector = Nothing 
End Function</code></pre>
<p>Several points worth mentioning are:</p>
<ul style="margin-left: 24px;">
<li>The ConnectorType can be one of three constants &#8211; <tt class="tt">msoConnectorCurve</tt>, <tt class="tt">msoConnectorElbow</tt>, or <tt class="tt">msoConnectorStraight</tt>.</li>
<li>The calculations for the beginning and ending points are not normally needed. You could put any values in for the <tt class="tt">AddConnector()</tt> function because once you call <tt class="tt">BeginConnect</tt> and <tt class="tt">EndConnect</tt>, the connector is attached to the shapes and the begin and end points get set automatically.</li>
<li>How the end coordinates are specified is not consistent between Excel versions. Prior to Excel 2007, the end coordinates were relative to the begin coordinates. Starting in Excel 2007, the function now uses absolute coordinates.</li>
<li>When you route a Connector to an AutoShape, you need to specify the side using a connection site constant. The constants are different for each AutoShape type, but generally they start with the top side = 1 and go counter-clockwise. For example, most rectangular shapes have connection site constants where top = 1, left = 2, bottom = 3, and right = 4.</li>
<li>When you call the <tt class="tt">RerouteConnections()</tt> function, it sets the connection sides automatically in order to create the shortest path between the two shapes. So, unless you want a specific routing, you can get usually just guess at the connection site values then call <tt class="tt">RerouteConnections()</tt>.</li>
</ul>
<h3>Formatting Connectors and Lines</h3>
<p>Like AutoShapes, formatting Connectors and Lines is fairly straightforward in Excel 2007 and  2010. Here is a comparison of two formatting routines for older versions of Excel versus the newer versions:</p>
<pre class="vbasmall"><code>Sub FormatConnector2003(oConnector As Shape)
  With oConnector
    If .Connector Or .Type = msoLine Then
      <span style="color: #008000;">' rough approximation of the Excel 2007 preset line style #17</span>
      .Line.EndArrowheadStyle = msoArrowheadTriangle
      .Line.Weight = 2
      .Line.ForeColor.RGB = RGB(192, 80, 77)
      .Shadow.Type = msoShadow6
      .Shadow.IncrementOffsetX -4.5
      .Shadow.IncrementOffsetY -4.5
      .Shadow.ForeColor.RGB = RGB(192, 192, 192)
      .Shadow.Transparency = 0.5
      .Visible = msoTrue
    End If
  End With
End Sub

Sub FormatConnector2007(oConnector As Shape)
  With oConnector
    If .Connector Or .Type = msoLine Then
      .Line.EndArrowheadStyle = msoArrowheadTriangle
      .ShapeStyle = msoLineStylePreset17
    End If
  End With
End Sub</code></pre>
<p>The Connector property, used above, returns a  Boolean indicating whether the shape is a connector. The <tt class="tt">Type=msoLine</tt> statement checks if the shape is a line. In this case the code will format both connectors and lines the same way,  but at times you may want handle them separately.<em> (NB: The Insert Shapes gallery of Excel 2007 only lets you add  Connectors, not Lines. So unless you are dealing with legacy files or add Lines via code, testing <tt class="tt">Type=msoLine</tt> may never be an issue for  you.)</em></p>
<p>Like the shape styles, you can format the line style by setting the ShapeStyle to one of the  <tt class="tt">msoLineStylePreset<em>XX</em></tt> values, where <tt class="tt"><em>XX</em></tt> matches the order they appear in the style gallery (below) from left to right, top  to bottom.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-01/line-styles.png" alt="" width="392" height="168" /></p>
<p>The Line object has several other members worth mentioning. In addition to the EndArrowheadStyle shown above, there is a corresponding BeginArrowheadStyle property, a DashStyle property, and also a Style property that lets you create double lines.</p>
<h3>Miscellaneous Issues</h3>
<p>Here are a few Excel 2007 issues with AutoShapes that are good to be aware of :</p>
<ul style="margin-left: 24px;">
<li>If you copy a set of shapes, older versions of Office gave the option to Paste Special as editable AutoShapes in other Office applications. This option no longer exists in Office 2007. I haven&#8217;t tested this in Office 2010 beta yet.</li>
<li>In Excel 2007 and the 2010 beta, changing the AutoShape type will disconnect any incoming or outgoing Connectors to a shape. </li>
<li>Some print drivers (including PDF export handlers) do not handle printing thick Connectors well, e.g., elbow connectors may straighten. If this happens, either change the line thickness or try grouping all the shapes together prior to printing.</li>
<li>The Arc is an AutoShape but needs to be treated as a line when setting the ShapeStyle property.</li>
<li>Most of the styles are backward compatible except for styles 37-42 (the glossy button look in the bottom row of the style gallery). Styles 31-36 (the second row from bottom) do not render very well in Excel 2000.</li>
<li>You can add Callouts using the <tt class="tt">AddShape()</tt> or <tt class="tt">AddCallout()</tt> methods, but the <tt class="tt">AddCallout()</tt> method will only let you add four types, two of which are actually the same. Callouts have AutoShapeType values in the range of 105-124. Even though they have AutoShapeType values, the <tt class="tt">Shape.Type</tt> property will return <tt class="tt">msoCallout</tt> &#8211; not <tt class="tt">msoAutoShape</tt>. Confused? Wait, there&#8217;s more. The callouts with AutoShapeTypes from 105-108 actually return a <tt class="tt">Shape.Type = msoAutoShape</tt> &#8211; not <tt class="tt">msoCallout</tt>.</li>
</ul>
<h3>Sample File</h3>
<p>The sample file includes three demo sheets. The ShapeDemo sheet contains a macro to add two shapes, format them, then  add a connector and format it. The Animation sheet has a simple macro showing how to move a shape around the sheet. The CreateAutoShapes sheet has a macro to create all AutoShapes available in your version of Excel.</p>
<p>The ShapeDemo routine has two function calls that are commented out &#8211; <tt class="tt">IlluminateShapeText2003()</tt> and <tt class="tt">IlluminateShapeText2007()</tt>.  These subs add some gaudy formatting to the first letter of each text block, but they serve to highlight  some of the differences between Excel 2007 and previous versions. Two parts of the code worth looking at are the HasText  property and the formatting properties of TextFrame2. With the old TextFrame  object, you  would have to try accessing the <tt class="tt">TextFrame.Characters.Count</tt> property, which throws an error if no text exists. As for the  formatting,  the font colors in Excel 2003 and previous were limited to the colors in the pallet. In Excel 2007 and 2010, you can add  reflections, drop shadows, and glow as well as set  the color to whatever RGB value your heart desires.</p>
<p>Lastly, there is a module MCommon containing a sub that deletes all the AutoShapes on a sheet. In order not to delete  the command buttons on the sheet (which are shapes too), it creates a ShapeRange of the AutoShapes and deletes that. The  online help file shows the syntax for creating a ShapeRange when you know the names of the shapes at design time, but  the syntax is a bit tricky when creating one dynamically. The <tt class="tt">DeleteAllAutoShapes()</tt> sub in the sample file shows you how to do this.</p>
<p style="text-align: center;"><strong><a href="http://peltiertech.com/images/2010-01/excel-autoshapes-vba-files.zip" rel="nofollow" title="Excel Autoshapes VBA Files" >Click Here to Download the Sample File</a></strong></p>
<h3>About the Author</h3>
<p><a href="http://www.breezetree.com" rel="nofollow" ><img style="float: right;" src="http://peltiertech.com/images/2010-01/flowbreeze-logo-sm.png" alt="FlowBreeze Flowchart Software" /></a>Nicholas Hebb is the founder of BreezeTree Software and author of <a href="http://www.breezetree.com" rel="nofollow" >FlowBreeze Flowchart Software</a>, an add-in that automates flowcharting in Excel.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://www.exceluser.com/cmd.asp?Clk=1374689" rel="nofollow" ><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></a><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

