{"id":1547,"date":"2013-12-17T08:20:12","date_gmt":"2013-12-17T08:20:12","guid":{"rendered":"http:\/\/excelvbatutor.com\/?page_id=1547"},"modified":"2019-04-19T07:56:59","modified_gmt":"2019-04-19T07:56:59","slug":"excel-vba-2010-lesson-26-adding-and-manipulating-shapes","status":"publish","type":"page","link":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/","title":{"rendered":"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">&nbsp;<strong><a title=\"excel vba 2010 tutorial lesson 25\" href=\"http:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-25-creating-animation-in-excel-vba-2010\/\">[Lesson 25]<\/a>&lt;&lt;<a href=\"http:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-tutorial\/\">[Table of Contents]<\/a>&nbsp;<\/strong><\/h4>\n\n\n\n<p>Adding shapes to a spreadsheet can provide better information and make a report more presentable. There are two ways to add a shape to a spreadsheet in Excel 2010 VBA. The first is to add the shape from the Insert menu of Excel 2010, as shown in Figure 26.1<\/p>\n\n\n\n<script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3033628290023372\" data-ad-slot=\"9639157585\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"379\" height=\"684\" src=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\" alt=\"vba2010_figure26.1\" class=\"wp-image-1550\"\/><\/a><\/figure><\/div>\n\n\n\n<p><br><br><script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br><ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3033628290023372\" data-ad-slot=\"9639157585\"><\/ins><br><script><br \/>\n     (adsbygoogle = window.adsbygoogle || []).push({});<br \/>\n<\/script><br>Although this method can let you insert shapes easily, the choices of shapes are still limited.<\/p>\n\n\n\n<p>To have a greater selection of shapes, you need to use the Excel 2010 &nbsp;VBA &nbsp;code. Excel 2010 &nbsp;VBA code allows you the more flexibility in manipulating the shapes. You can properties such as color, 3D effects, types of shapes and more to produce spectacular shapes.<\/p>\n\n\n\n<p>The following is the code to draw a star-shape on the spreadsheet:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Private Sub CommandButton1_Click()\nDim wks As Worksheet\n Set wks = Worksheets(\"sheet1\")\nDim myshape As Shape\n Set myshape = wks.Shapes.AddShape(msoShape10pointStar, 90, 90, 90, 60)\n myshape.TextFrame.Characters.Text = \"My Shape\"\n myshape.TextFrame.Characters.Font.Bold = True\nWith myshape.ThreeD\n.Visible = True\n\n.Depth = 60\n.ExtrusionColor.RGB = RGB(255, 200, 255)\n.PresetLightingDirection = msoLightingTop\n\nEnd With\nmyshape.BottomRightCell = \"\"\n\nEnd Sub\n<\/pre>\n\n\n\n<p>The Output Image is shown below:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/figure_L25.1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"228\" src=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/figure_L25.1-300x228.jpg\" alt=\"figure_L25.1\" class=\"wp-image-2003\" srcset=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/figure_L25.1-300x228.jpg 300w, https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/figure_L25.1.jpg 468w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br><ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3033628290023372\" data-ad-slot=\"9639157585\"><\/ins><br><script><br \/>\n     (adsbygoogle = window.adsbygoogle || []).push({});<br \/>\n<\/script><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">&nbsp;<strong><a title=\"excel vba 2010 tutorial lesson 25\" href=\"http:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-25-creating-animation-in-excel-vba-2010\/\">[Lesson 25]<\/a>&lt;&lt;<a href=\"http:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-tutorial\/\">[Table of Contents]<\/a>&nbsp;<\/strong><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;[Lesson 25]&lt;&lt;[Table of Contents]&nbsp; Adding shapes to a spreadsheet can provide better information and make a report more presentable. There are two ways to add a shape to a spreadsheet in Excel 2010 VBA. The first is to add the shape from the Insert menu of Excel 2010, as shown in Figure 26.1 Although this &hellip; <a href=\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes&#8221;<\/span><\/a><\/p>\n","protected":false},"author":5012,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-1547","page","type-page","status-publish","hentry","category-shapes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor<\/title>\n<meta name=\"description\" content=\"This article discuss how to add and manipulate shapes in Excel 2010 VBA\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\" \/>\n<meta property=\"og:description\" content=\"This article discuss how to add and manipulate shapes in Excel 2010 VBA\" \/>\n<meta property=\"og:url\" content=\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-19T07:56:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"379\" \/>\n\t<meta property=\"og:image:height\" content=\"684\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\",\"url\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\",\"name\":\"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\",\"isPartOf\":{\"@id\":\"https:\/\/excelvbatutor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\",\"datePublished\":\"2013-12-17T08:20:12+00:00\",\"dateModified\":\"2019-04-19T07:56:59+00:00\",\"description\":\"This article discuss how to add and manipulate shapes in Excel 2010 VBA\",\"breadcrumb\":{\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage\",\"url\":\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\",\"contentUrl\":\"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg\",\"width\":379,\"height\":684},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/excelvbatutor.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/excelvbatutor.com\/#website\",\"url\":\"https:\/\/excelvbatutor.com\/\",\"name\":\"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor\",\"description\":\"Master Excel VBA with free tutorials, examples, and personalized guidance. Perfect for beginners and advanced users looking to automate Excel.\",\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","description":"This article discuss how to add and manipulate shapes in Excel 2010 VBA","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/","og_locale":"en_US","og_type":"article","og_title":"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","og_description":"This article discuss how to add and manipulate shapes in Excel 2010 VBA","og_url":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/","og_site_name":"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","article_modified_time":"2019-04-19T07:56:59+00:00","og_image":[{"width":379,"height":684,"url":"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg","type":"image\/jpeg"}],"twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/","url":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/","name":"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes - Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","isPartOf":{"@id":"https:\/\/excelvbatutor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage"},"image":{"@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage"},"thumbnailUrl":"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg","datePublished":"2013-12-17T08:20:12+00:00","dateModified":"2019-04-19T07:56:59+00:00","description":"This article discuss how to add and manipulate shapes in Excel 2010 VBA","breadcrumb":{"@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#primaryimage","url":"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg","contentUrl":"https:\/\/excelvbatutor.com\/wp-content\/uploads\/2013\/12\/vba2010_figure26.1.jpg","width":379,"height":684},{"@type":"BreadcrumbList","@id":"https:\/\/excelvbatutor.com\/index.php\/excel-vba-2010-lesson-26-adding-and-manipulating-shapes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/excelvbatutor.com\/"},{"@type":"ListItem","position":2,"name":"Excel 2010 VBA Lesson 26: Adding and Manipulating Shapes"}]},{"@type":"WebSite","@id":"https:\/\/excelvbatutor.com\/#website","url":"https:\/\/excelvbatutor.com\/","name":"Learn Excel VBA Online \u2013 Step-by-Step Tutorials &amp; Courses | ExcelVBATutor","description":"Master Excel VBA with free tutorials, examples, and personalized guidance. Perfect for beginners and advanced users looking to automate Excel.","inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/pages\/1547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/users\/5012"}],"replies":[{"embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/comments?post=1547"}],"version-history":[{"count":27,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/pages\/1547\/revisions"}],"predecessor-version":[{"id":3335,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/pages\/1547\/revisions\/3335"}],"wp:attachment":[{"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/media?parent=1547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/categories?post=1547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelvbatutor.com\/index.php\/wp-json\/wp\/v2\/tags?post=1547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}