<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7368573915493703872</id><updated>2026-04-09T11:34:41.613-07:00</updated><category term="Chart Series Invisible"/><category term="Chart Series Order"/><category term="Charts"/><category term="Custom CommandBar/Menu"/><category term="PasteLink Chart Range"/><category term="Resize Height Width Shapes"/><category term="Stacked Column Chart DataLabel Total"/><category term="Word"/><category term="format slide titles"/><category term="hide unhide comments"/><category term="layout ppLayoutTitleOnly"/><category term="resize shapes msoShapeType"/><category term="toggle hide unhide sheets"/><category term="update links"/><title type='text'>Simple Microsoft VBA Macros for Excel, PowerPoint, &amp;amp; Word</title><subtitle type='html'>Simple and quick reference Microsoft VBA macros to automate many common-place and manual tasks to save time for novice/amateur programmers. These macros are not developed professionally and are not error-proof. Please post suggestions/errors/enhancements.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-3777174212112501597</id><published>2009-12-04T17:59:00.000-08:00</published><updated>2020-06-15T16:05:02.475-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Stacked Column Chart DataLabel Total"/><title type='text'>[Charts] How to Display Totals on a Stacked Column (Bar) Chart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Lets say, there is a stacked column chart in Excel created using the data as shown:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/_nDnXjC22byg/Sxm6vSncmbI/AAAAAAAAAao/vFQT3w1wN-g/s1600-h/StackedBarTotal1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Data table for Stacked Column Chart in Excel&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://1.bp.blogspot.com/_nDnXjC22byg/Sxm6vSncmbI/AAAAAAAAAao/vFQT3w1wN-g/s400/StackedBarTotal1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/_nDnXjC22byg/Sxm6yUwfPoI/AAAAAAAAAaw/a-XwJHfrNRw/s1600-h/StackedBarTotal2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;How to create Stacked Column Chart in Excel&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://4.bp.blogspot.com/_nDnXjC22byg/Sxm6yUwfPoI/AAAAAAAAAaw/a-XwJHfrNRw/s400/StackedBarTotal2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now, we want to display totals, for example 34 + 43 = 77 at the top of the stacked columns. In stacked column chart, Excel does not allow the &quot;Outer End&quot; option of Data Label position.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
To overcome this limitation, create a &quot;Total&quot; column in the data table as shown:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/_nDnXjC22byg/Sxm7teZGtUI/AAAAAAAAAa4/oY6w_1lYyPY/s1600-h/StackedBarTotal3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;How to add total at top of Stacked Column Chart in Excel&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://3.bp.blogspot.com/_nDnXjC22byg/Sxm7teZGtUI/AAAAAAAAAa4/oY6w_1lYyPY/s400/StackedBarTotal3.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Now change the source data of the chart to include column D as shown below:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/_nDnXjC22byg/Sxm8WsK2LII/AAAAAAAAAbA/7fb2q_gkWRc/s1600-h/StackedBarTotal3a.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://4.bp.blogspot.com/_nDnXjC22byg/Sxm8WsK2LII/AAAAAAAAAbA/7fb2q_gkWRc/s400/StackedBarTotal3a.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
The Total column will appear as show above.&lt;br /&gt;
Next, right-click on the new &quot;total&quot; series and change the Chart Type to Line and the resulting chart is shown below:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/_nDnXjC22byg/Sxm8_w-4mbI/AAAAAAAAAbI/gD2_CQls84w/s1600-h/StackedBarTotal4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Data table for Stacked Column Chart in Excel&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://3.bp.blogspot.com/_nDnXjC22byg/Sxm8_w-4mbI/AAAAAAAAAbI/gD2_CQls84w/s400/StackedBarTotal4.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Next, double-click on the Line and set the Line color as &quot;None&quot; and Marker as &quot;None&quot; under the &quot;Patterns&quot; tab.&lt;br /&gt;
Go to &quot;Data Labels&quot; tab and&amp;nbsp;select &quot;Value&quot; checkbox, and the resulting final chart will look like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/_nDnXjC22byg/Sxm9kxo5MYI/AAAAAAAAAbQ/iKZ-RnnUSqg/s1600-h/StackedBarTotal5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Data table for Stacked Column Chart in Excel&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;https://4.bp.blogspot.com/_nDnXjC22byg/Sxm9kxo5MYI/AAAAAAAAAbQ/iKZ-RnnUSqg/s400/StackedBarTotal5.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Hope you found this tutorial helpful.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/3777174212112501597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/12/charts-how-to-display-totals-on-stacked.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3777174212112501597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3777174212112501597'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/12/charts-how-to-display-totals-on-stacked.html' title='[Charts] How to Display Totals on a Stacked Column (Bar) Chart'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/_nDnXjC22byg/Sxm6vSncmbI/AAAAAAAAAao/vFQT3w1wN-g/s72-c/StackedBarTotal1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-9207423802021039174</id><published>2009-12-01T20:11:00.000-08:00</published><updated>2009-12-01T20:26:52.930-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Custom CommandBar/Menu"/><title type='text'>[Excel] Creating a Custom Menu/Command bar Using VBA Macro and Add-Ins</title><content type='html'>&lt;strong&gt;This macro creates a custom command bar at the bottom part of the Excel window as shown. &lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/SxXrnosMnII/AAAAAAAAAag/680iaAc9rto/s1600-h/CustomMenuBar.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;strong&gt;&lt;img alt=&quot;Custom Menu/CommandBar Addin&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/SxXrnosMnII/AAAAAAAAAag/680iaAc9rto/s400/CustomMenuBar.JPG&quot; /&gt;&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;strong&gt;The command bar has three menu items. Each of the menu items are assigned to a macro. &lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Here is how to go about creating a custom command bar:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 1: Create a new Excel file and use the code below to create your own command bar&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Step 2: Save the file as an AddIn, for example &quot;Utility.xla&quot;.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Step 3: Go to Tools -&amp;gt; Add-ins and browse the addin file you created as shown. Each time Excel is opened, this add-in is called and the Command Bar is ready to use.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/SxXrdk2EqwI/AAAAAAAAAaY/JQZzbv9HZnM/s1600-h/CustomMenuBar2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Custom Menu/CommandBar Addin&quot; border=&quot;0&quot; er=&quot;true&quot; src=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/SxXrdk2EqwI/AAAAAAAAAaY/JQZzbv9HZnM/s400/CustomMenuBar2.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: green;&quot;&gt;&#39;=========================================================================&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;&#39; Creating Utility Command Bar with Button Menu Items with Icons&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color: green;&quot;&gt;&#39; Copyright vbacentral.blogspot.com&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;&#39;=========================================================================&lt;/span&gt;
&lt;span style=&quot;color: #0000a0;&quot;&gt;Option&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Explicit&lt;/span&gt;
&lt;hr size=&quot;1&quot; style=&quot;verticalalign: top;&quot; /&gt;&lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt; Create_Utility_Menu()
&lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; MyBar &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; CommandBar
&lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; MyPopup &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; CommandBarPopup
&lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; MyButton &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; CommandBarButton
&lt;span style=&quot;color: green;&quot;&gt;&#39; Delete Menu, if it was already created&lt;/span&gt;

&lt;span style=&quot;color: #0000a0;&quot;&gt;On&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Error&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Resume&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt;
CommandBars(&quot;Utility Menu&quot;).Delete
&lt;span style=&quot;color: #0000a0;&quot;&gt;On&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Error&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;GoTo&lt;/span&gt; 0
&lt;span style=&quot;color: green;&quot;&gt;&#39; Create a Command Bar object on the bottom of the Excel window&lt;/span&gt;

&lt;span style=&quot;color: #0000a0;&quot;&gt;Set&lt;/span&gt; MyBar = CommandBars.Add(&lt;span style=&quot;color: #0000a0;&quot;&gt;Name&lt;/span&gt;:&quot;Utility Menu&quot;, _
    Position:=msoBarBottom, Temporary:=True)
&lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; MyBar
&lt;span style=&quot;color: green;&quot;&gt;    &#39;.Width = 200&lt;/span&gt;
    .Visible = &lt;span style=&quot;color: #0000a0;&quot;&gt;True&lt;/span&gt;
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Set&lt;/span&gt; MyButton = MyBar.Controls.Add(&lt;span style=&quot;color: #0000a0;&quot;&gt;Type&lt;/span&gt;:=msoControlButton)
    &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; MyButton
        .Caption = &quot;Move Sheets Around&quot;
        .Style = msoButtonIconAndCaption
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Other Menu item types include:&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;msoButtonAutomatic, msoButtonIcon, msoButtonCaption, or msoButtonIconandCaption&lt;/span&gt;
        .BeginGroup = &lt;span style=&quot;color: #0000a0;&quot;&gt;True&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a macro (in this case macro name is MoveSheets)&lt;/span&gt;
        .OnAction = &quot;MoveSheets&quot;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a picture icon using predefined Office icons&lt;/span&gt;
        .FaceId = 1771
    &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt;
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Set&lt;/span&gt; MyButton = MyBar.Controls.Add(&lt;span style=&quot;color: #0000a0;&quot;&gt;Type&lt;/span&gt;:=msoControlButton)
    &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; MyButton
        .Caption = &quot;Hide/Unhide Sheets&quot;
        .Style = msoButtonIconAndCaption
        .BeginGroup = &lt;span style=&quot;color: #0000a0;&quot;&gt;True&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a macro (in this case macro name is HideUnhideSelectedSheets)&lt;/span&gt;
        .OnAction = &quot;HideUnhideSelectedSheets&quot;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a picture icon using predefined Office icons&lt;/span&gt;
        .FaceId = 488
    &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt;
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Set&lt;/span&gt; MyButton = MyBar.Controls.Add(&lt;span style=&quot;color: #0000a0;&quot;&gt;Type&lt;/span&gt;:=msoControlButton)
    &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; MyButton
        .Caption = &quot;Go to Sheet&quot;
        .Style = msoButtonIconAndCaption
        .BeginGroup = &lt;span style=&quot;color: #0000a0;&quot;&gt;True&lt;/span&gt;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a macro (in this case macro name is GoToSheet)&lt;/span&gt;
        .OnAction = &quot;GoToSheet&quot;
&lt;span style=&quot;color: green;&quot;&gt;        &#39;Assign a picture icon using predefined Office icons&lt;/span&gt;
        .FaceId = 917
    &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt;
&lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt;
&lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt;



&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/9207423802021039174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/12/excel-creating-custom-menucommand-bar.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/9207423802021039174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/9207423802021039174'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/12/excel-creating-custom-menucommand-bar.html' title='[Excel] Creating a Custom Menu/Command bar Using VBA Macro and Add-Ins'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_nDnXjC22byg/SxXrnosMnII/AAAAAAAAAag/680iaAc9rto/s72-c/CustomMenuBar.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-2865457191153608107</id><published>2009-11-25T15:33:00.001-08:00</published><updated>2009-11-25T15:35:44.702-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Chart Series Invisible"/><title type='text'>[Excel] Making Chart Series Invisible</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&#39;-----------------------------------------------------------------&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;color: green;&quot;&gt;&#39;Make a Chart Series Invisible&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;-----------------------------------------------------------------&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;This macro loops through all he series of a selected chart&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;and for each series in the chart, it asks the user if they want&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;to make the series invisible&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;Making a series invisible simply means the following:&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;-Setting the Border as None&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;-Setting the Background Color as None&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;-Setting the Marker Type as None&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;For this macro to work properly, a chart has to be selected&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;Copyright: vbacentral.blogspot.com&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;-----------------------------------------------------------------&lt;/span&gt; 

&lt;hr size=&quot;1&quot; /&gt;&lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt; MakeSeriesInvisible()
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; s &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; Series
    &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Each&lt;/span&gt; s &lt;span style=&quot;color: #0000a0;&quot;&gt;In&lt;/span&gt; ActiveChart.SeriesCollection
      &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; s
        resp = MsgBox(&quot;Do you want to make series: &quot; &amp;amp; Chr(34) &amp;amp; _
                       s.Name &amp;amp; Chr(34) &amp;amp; &quot; invisible?&quot;, vbYesNo)
        &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; resp = vbYes &lt;span style=&quot;color: #0000a0;&quot;&gt;Then&lt;/span&gt; 
          .Border.LineStyle = xlNone
          .MarkerBackgroundColorIndex = xlColorIndexNone
          .MarkerStyle = xlNone
        &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; 
      &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;With&lt;/span&gt; 
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; s
&lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt; 

&lt;/pre&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/2865457191153608107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-making-chart-series-invisible.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/2865457191153608107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/2865457191153608107'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-making-chart-series-invisible.html' title='[Excel] Making Chart Series Invisible'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-8366675864436277579</id><published>2009-11-25T14:43:00.000-08:00</published><updated>2009-11-25T15:11:30.255-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Chart Series Order"/><title type='text'>[Excel] Changing Chart Series Order</title><content type='html'>&lt;b&gt;Here is a Bar Chart with Series 1 to 6. (bottom-up)&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/Sw2zhEoy_UI/AAAAAAAAAaA/BQzKPpVGqP4/s1600/XLChart_Series_2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Excel Bar Chart Series Order&quot; border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_nDnXjC22byg/Sw2zhEoy_UI/AAAAAAAAAaA/BQzKPpVGqP4/s400/XLChart_Series_2.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;The data table is as shown below&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_nDnXjC22byg/Sw2zoSjr9LI/AAAAAAAAAaI/fZbrcPs09bg/s1600/XLChart_Series_1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Excel Bar Chart Series Order&quot; border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_nDnXjC22byg/Sw2zoSjr9LI/AAAAAAAAAaI/fZbrcPs09bg/s400/XLChart_Series_1.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;If the series order required is: 5, 1, 3, 2, 6, 4 then enter the series names inside the code and select the chart and run the macro. The series order will be changed accordingly&lt;/b&gt;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_nDnXjC22byg/Sw2zqBQPxBI/AAAAAAAAAaQ/wBP3ATXdDqY/s1600/XLChart_Series_3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Excel Bar Chart Series Order&quot; border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_nDnXjC22byg/Sw2zqBQPxBI/AAAAAAAAAaQ/wBP3ATXdDqY/s400/XLChart_Series_3.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre&gt;&lt;span style=&quot;color: green;&quot;&gt;&#39;---------------------------------------------------------------&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;This macro changes the order of series in a collection of series&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;of a chart. The series names has to be hard coded inside this&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;code.&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;For this macro to work property&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;1. A chart should be selected&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;2. It should have more than 1 series&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;Copyright vbacentral.blogspot.com&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;&#39;---------------------------------------------------------------&lt;/span&gt; 

&lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt; OrderFeesSeriesOfActiveChart()
 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; sc &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; SeriesCollection
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; s &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; Series
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; LookupArray(6, 2) &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Variant&lt;/span&gt; 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; SeriesNameArray() &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Variant&lt;/span&gt; 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; OrderArray() &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Variant&lt;/span&gt; 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; Temp(1, 2) &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Variant&lt;/span&gt; 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; str, str1 &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;String&lt;/span&gt; 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Dim&lt;/span&gt; SeriesCount, Count &lt;span style=&quot;color: #0000a0;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Integer&lt;/span&gt; 
 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Set&lt;/span&gt; sc = ActiveChart.SeriesCollection
  
&lt;span style=&quot;color: green;&quot;&gt;  &#39; Count the number of series in the selected chart&lt;/span&gt; 
  Count = 0
  &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Each&lt;/span&gt; s &lt;span style=&quot;color: #0000a0;&quot;&gt;In&lt;/span&gt; sc
    &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; Trim(s.Name) &amp;lt;&amp;gt; &quot;Total&quot; &lt;span style=&quot;color: #0000a0;&quot;&gt;Then&lt;/span&gt; Count = Count + 1
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; s
  
  SeriesCount = Count
  
  &lt;span style=&quot;color: #0000a0;&quot;&gt;ReDim&lt;/span&gt; SeriesNameArray(SeriesCount)
  &lt;span style=&quot;color: #0000a0;&quot;&gt;ReDim&lt;/span&gt; OrderArray(SeriesCount, 2)
  
&lt;span style=&quot;color: green;&quot;&gt;  &#39; Create 2x2 Lookup array with order wanted.&lt;/span&gt; 
&lt;span style=&quot;color: green;&quot;&gt;  &#39; Hardcode the series names according to the desired order&lt;/span&gt;
  LookupArray(1, 1) = &quot;Series 5&quot;
  LookupArray(2, 1) = &quot;Series 1&quot;
  LookupArray(3, 1) = &quot;Series 3&quot;
  LookupArray(4, 1) = &quot;Series 2&quot;
  LookupArray(5, 1) = &quot;Series 6&quot;
  LookupArray(6, 1) = &quot;Series 4&quot;
  LookupArray(1, 2) = 1
  LookupArray(2, 2) = 2
  LookupArray(3, 2) = 3
  LookupArray(4, 2) = 4
  LookupArray(5, 2) = 5
  LookupArray(6, 2) = 6
 
&lt;span style=&quot;color: green;&quot;&gt;   &#39;Store series names in an array&lt;/span&gt; 
    &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; k = 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;UBound&lt;/span&gt;(SeriesNameArray())
      SeriesNameArray(k) = Trim(sc(k).Name)
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; k
    
&lt;span style=&quot;color: green;&quot;&gt;   &#39;Lookup series order from Lookup array&lt;/span&gt; 
    &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; i = 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;UBound&lt;/span&gt;(LookupArray())
        &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; j = 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;UBound&lt;/span&gt;(SeriesNameArray())
          &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; LookupArray(i, 1) = SeriesNameArray(j) &lt;span style=&quot;color: #0000a0;&quot;&gt;Then&lt;/span&gt; 
            OrderArray(j, 1) = LookupArray(i, 1)
            OrderArray(j, 2) = LookupArray(i, 2)
            &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; 
        &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; j
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; i
    
&lt;span style=&quot;color: green;&quot;&gt;   &#39;Sort the elements in OrderArray using order obtained from Lookup array&lt;/span&gt; 
    &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; i = 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; SeriesCount - 1
      &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; j = i + 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; SeriesCount
        &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; OrderArray(i, 2) &amp;gt; OrderArray(j, 2) &lt;span style=&quot;color: #0000a0;&quot;&gt;Then&lt;/span&gt; 
          Temp(1, 1) = OrderArray(j, 1)
          Temp(1, 2) = OrderArray(j, 2)
          OrderArray(j, 1) = OrderArray(i, 1)
          OrderArray(j, 2) = OrderArray(i, 2)
          OrderArray(i, 1) = Temp(1, 1)
          OrderArray(i, 2) = Temp(1, 2)
        &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; 
      &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; j
    &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; i
&lt;span style=&quot;color: green;&quot;&gt;  &#39;Assign new series order&lt;/span&gt; 
 
  &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Each&lt;/span&gt; s &lt;span style=&quot;color: #0000a0;&quot;&gt;In&lt;/span&gt; sc
      &lt;span style=&quot;color: #0000a0;&quot;&gt;For&lt;/span&gt; i = 1 &lt;span style=&quot;color: #0000a0;&quot;&gt;To&lt;/span&gt; SeriesCount
          &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; Trim(s.Name) = OrderArray(i, 1) &lt;span style=&quot;color: #0000a0;&quot;&gt;Then&lt;/span&gt; 
              s.PlotOrder = i
          &lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;If&lt;/span&gt; 
      &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; i
  &lt;span style=&quot;color: #0000a0;&quot;&gt;Next&lt;/span&gt; s
 
&lt;span style=&quot;color: #0000a0;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: #0000a0;&quot;&gt;Sub&lt;/span&gt; 
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/8366675864436277579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-changing-chart-series-order.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/8366675864436277579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/8366675864436277579'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-changing-chart-series-order.html' title='[Excel] Changing Chart Series Order'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_nDnXjC22byg/Sw2zhEoy_UI/AAAAAAAAAaA/BQzKPpVGqP4/s72-c/XLChart_Series_2.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-3403729369456326530</id><published>2009-11-20T14:37:00.000-08:00</published><updated>2009-11-25T14:21:15.968-08:00</updated><title type='text'>[Excel] Hiding/Unhiding sheets using an User Form</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_nDnXjC22byg/SwcZm1qYAxI/AAAAAAAAAZo/rMWmmL2kP28/s1600/UserForm+Hide+Unhide+Sheets.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_nDnXjC22byg/SwcZm1qYAxI/AAAAAAAAAZo/rMWmmL2kP28/s400/UserForm+Hide+Unhide+Sheets.JPG&quot; yr=&quot;true&quot; atl=&quot;UserForm for Hide Unhide Excel sheets&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&#39;************************************************************&lt;br /&gt;
&#39; The code to call the Form should be written in Modules Section&lt;br /&gt;
&#39;************************************************************&lt;br /&gt;
Sub HideUnhideSelectedSheets()&lt;br /&gt;
UserFormHideUnhide.Show&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39; The Code to generate form should be written inside Forms section as shown below:&lt;br /&gt;
&#39; Create a Form named &quot;UserFormHideUnhide&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_nDnXjC22byg/SwcdeQCSxLI/AAAAAAAAAZ4/irYwtMdE8hM/s1600/UserForm+HideUnhide+1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_nDnXjC22byg/SwcdeQCSxLI/AAAAAAAAAZ4/irYwtMdE8hM/s400/UserForm+HideUnhide+1.JPG&quot; yr=&quot;true&quot; atl=&quot;UserForm for Hide Unhide Excel sheets&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39;************************************************************&lt;br /&gt;
&#39;*** Code behind UserFormHideUnhide form&lt;br /&gt;
&#39; - The form displays Visible and Invisible sheets&lt;br /&gt;
&#39; side-by-side. The users can use the buttons to switch&lt;br /&gt;
&#39; sheets between Hidden and Visible options&lt;br /&gt;
&#39; - Once the user submits the form all the changes are&lt;br /&gt;
&#39; applied to the sheets&#39; visibility&lt;br /&gt;
&#39;*** Names of the Controls on the UserForm&lt;br /&gt;
&#39; Listbox: ListBox1 - displays a list of visible sheets&lt;br /&gt;
&#39; Listbox: ListBox2 - displays a list of hidden sheets&lt;br /&gt;
&#39; Button: MoveAllToRight - &quot;&amp;gt;&amp;gt;&quot; used to make all sheets&lt;br /&gt;
&#39; but one hidden&lt;br /&gt;
&#39; Button: MoveSelectedToRight - &quot;&amp;gt;&quot; hide one sheet at a time&lt;br /&gt;
&#39; Button: MoveSelectedToLeft - &quot;&amp;lt;&quot; unhide one sheet at a time &#39; Button: MoveAllToLeft - &quot;&amp;gt;&amp;gt;&quot; used to make all sheets&lt;br /&gt;
&#39; visible&lt;br /&gt;
&#39; Button: Cancel - used to cancel the Form(dialog box)&lt;br /&gt;
&#39; Button: Hide/Unhide - used to submit the UserForm&lt;br /&gt;
&#39;************************************************************&lt;br /&gt;
&lt;br /&gt;
&#39;*** Initialize dialog box with Visible and Hidden sheets list&lt;br /&gt;
&lt;br /&gt;
Private Sub UserForm_Initialize()&lt;br /&gt;
&lt;br /&gt;
Dim sht As Variant&lt;br /&gt;
Dim shts As Sheets&lt;br /&gt;
&lt;br /&gt;
For Each sht In ActiveWorkbook.Sheets&lt;br /&gt;
If sht.Visible Then&lt;br /&gt;
ListBox1.AddItem sht.Name&lt;br /&gt;
Else: ListBox2.AddItem sht.Name&lt;br /&gt;
End If&lt;br /&gt;
Next sht&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;*** Button to Hide all Visible sheets&lt;br /&gt;
Private Sub MoveAllToRight_Click()&lt;br /&gt;
&#39;Add all but one Visible sheets into Hidden sheets list&lt;br /&gt;
For i = 1 To ListBox1.ListCount - 1&lt;br /&gt;
ListBox2.AddItem ListBox1.List(i)&lt;br /&gt;
Next i&lt;br /&gt;
&#39;Remove all but one sheets from Visible sheets list&lt;br /&gt;
For i = 1 To ListBox1.ListCount - 1&lt;br /&gt;
ListBox1.RemoveItem (1)&lt;br /&gt;
Next i&lt;br /&gt;
&lt;br /&gt;
MsgBox &quot;At least one sheet should be visible&quot;&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;***Button to hide selected visible sheets&lt;br /&gt;
Private Sub MoveSelectedToRight_Click()&lt;br /&gt;
&lt;br /&gt;
Dim CountVisibleSheets, LastSelection, j As Integer&lt;br /&gt;
CountVisibleSheets = ListBox1.ListCount - 1&lt;br /&gt;
&lt;br /&gt;
&#39;Excel requires at least one sheet to be visible&lt;br /&gt;
If ListBox1.ListCount = 1 Then&lt;br /&gt;
LastSelection = 0&lt;br /&gt;
MsgBox &quot;At least one sheet should be visible&quot;&lt;br /&gt;
Else&lt;br /&gt;
&#39;Add selected sheets to Hidden sheets listbox&lt;br /&gt;
For i = 0 To CountVisibleSheets&lt;br /&gt;
If ListBox1.Selected(i) Then&lt;br /&gt;
ListBox2.AddItem ListBox1.List(i)&lt;br /&gt;
End If&lt;br /&gt;
Next i&lt;br /&gt;
&lt;br /&gt;
&#39;Remove selected sheets from Visible sheets list&lt;br /&gt;
j = 0&lt;br /&gt;
Do Until j = ListBox1.ListCount&lt;br /&gt;
If ListBox1.Selected(j) Then&lt;br /&gt;
ListBox1.RemoveItem (j)&lt;br /&gt;
LastSelection = j&lt;br /&gt;
j = j - 1&lt;br /&gt;
End If&lt;br /&gt;
j = j + 1&lt;br /&gt;
Loop&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#39;Maintain a selection by moving selection to next visible sheet&lt;br /&gt;
If LastSelection &amp;lt; ListBox1.ListCount Then&lt;br /&gt;
ListBox1.Selected(LastSelection) = True&lt;br /&gt;
Else&lt;br /&gt;
ListBox1.Selected(LastSelection - 1) = True&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;*** Button to Unhide selected Hidden sheets&lt;br /&gt;
Private Sub MoveSelectedToLeft_Click()&lt;br /&gt;
Dim CountVisibleSheets, LastSelection As Integer&lt;br /&gt;
CountVisibleSheets = ListBox2.ListCount - 1&lt;br /&gt;
&lt;br /&gt;
For i = 0 To CountVisibleSheets&lt;br /&gt;
If ListBox2.Selected(i) Then&lt;br /&gt;
ListBox1.AddItem ListBox2.List(i)&lt;br /&gt;
End If&lt;br /&gt;
Next i&lt;br /&gt;
&lt;br /&gt;
j = 0&lt;br /&gt;
Do Until j = ListBox2.ListCount&lt;br /&gt;
If ListBox2.Selected(j) Then&lt;br /&gt;
ListBox2.RemoveItem (j)&lt;br /&gt;
LastSelection = j&lt;br /&gt;
j = j - 1&lt;br /&gt;
End If&lt;br /&gt;
j = j + 1&lt;br /&gt;
Loop&lt;br /&gt;
&#39;Maintain a selection by moving selection to next Hidden sheet&lt;br /&gt;
If LastSelection &amp;lt; ListBox2.ListCount Then&lt;br /&gt;
ListBox2.Selected(LastSelection) = True&lt;br /&gt;
ElseIf ListBox2.ListCount = 0 Then&lt;br /&gt;
Else&lt;br /&gt;
ListBox2.Selected(LastSelection - 1) = True&lt;br /&gt;
End If&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;*** Button to Unhide all Hidden sheets&lt;br /&gt;
Private Sub MoveAllToLeft_Click()&lt;br /&gt;
Dim CountHiddenSheets As Integer&lt;br /&gt;
CountHiddenSheets = ListBox2.ListCount - 1&lt;br /&gt;
&lt;br /&gt;
For i = 0 To CountHiddenSheets&lt;br /&gt;
ListBox1.AddItem ListBox2.List(i)&lt;br /&gt;
Next i&lt;br /&gt;
&lt;br /&gt;
For i = 0 To CountHiddenSheets&lt;br /&gt;
ListBox2.RemoveItem (0)&lt;br /&gt;
Next i&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;*** Cancel dialog button&lt;br /&gt;
Private Sub CommandCancel_Click()&lt;br /&gt;
Unload UserFormHideUnhide&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&#39;*** Submit selection for hiding and unhiding sheets&lt;br /&gt;
Private Sub CommandHideUnhide_Click()&lt;br /&gt;
For i = 0 To ListBox1.ListCount - 1&lt;br /&gt;
ActiveWorkbook.Sheets(ListBox1.List(i)).Visible = True&lt;br /&gt;
Next i&lt;br /&gt;
For i = 0 To ListBox2.ListCount - 1&lt;br /&gt;
If i = ActiveWorkbook.Sheets.Count - 1 Then&lt;br /&gt;
MsgBox &quot;At least one sheet should be visible&quot;&lt;br /&gt;
Exit For&lt;br /&gt;
Else&lt;br /&gt;
ActiveWorkbook.Sheets(ListBox2.List(i)).Visible = False&lt;br /&gt;
End If&lt;br /&gt;
Next i&lt;br /&gt;
End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/3403729369456326530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-hidingunhiding-sheets-using-user.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3403729369456326530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3403729369456326530'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-hidingunhiding-sheets-using-user.html' title='[Excel] Hiding/Unhiding sheets using an User Form'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_nDnXjC22byg/SwcZm1qYAxI/AAAAAAAAAZo/rMWmmL2kP28/s72-c/UserForm+Hide+Unhide+Sheets.JPG" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-4592007148469446193</id><published>2009-11-19T16:12:00.001-08:00</published><updated>2009-11-19T16:12:55.424-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hide unhide comments"/><title type='text'>Excel: Hide Unhide Comments</title><content type='html'>&#39;-----------------------------------------------------------------&lt;br /&gt;
&#39; Hide/Unhide Comments&lt;br /&gt;
&#39; This macro toggles comments display&lt;br /&gt;
&#39;-----------------------------------------------------------------&lt;br /&gt;
Sub ShowComments()&lt;br /&gt;
&lt;br /&gt;
  Application.DisplayCommentIndicator = Application.DisplayCommentIndicator * -1&lt;br /&gt;
&lt;br /&gt;
End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/4592007148469446193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-hide-unhide-comments.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/4592007148469446193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/4592007148469446193'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-hide-unhide-comments.html' title='Excel: Hide Unhide Comments'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-1052018673702389764</id><published>2009-11-19T16:04:00.001-08:00</published><updated>2009-11-19T16:04:49.494-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="toggle hide unhide sheets"/><title type='text'>Excel: Toggle Hide Unhide data sheets</title><content type='html'>&#39;--------------------------------------------------------------------------------&lt;br /&gt;
&#39; Toggle Hide Unhide data sheets&lt;br /&gt;
&#39; This macro creates an array of sheet names and upon running this macro&lt;br /&gt;
&#39; will hide/unhide sheets&lt;br /&gt;
&#39; Note: Atleast one sheet should be visible&lt;br /&gt;
&#39;       &lt;br /&gt;
&#39;--------------------------------------------------------------------------------&lt;br /&gt;
Sub ToggleHideUnhideDataSheets()&lt;br /&gt;
&lt;br /&gt;
Application.ScreenUpdating = False&lt;br /&gt;
&lt;br /&gt;
Dim wb As Workbook&lt;br /&gt;
Dim ShtNames() As Variant&lt;br /&gt;
&lt;br /&gt;
Set wb = ActiveWorkbook&lt;br /&gt;
&lt;br /&gt;
ShtNames = Array(&quot;Sheet1&quot;, &quot;Sheet2&quot;, &quot;Sheet3&quot;, &quot;Sheet4&quot;, &quot;Sheet5&quot;)&lt;br /&gt;
&lt;br /&gt;
For i = 0 To UBound(ShtNames)&lt;br /&gt;
        wb.Sheets(ShtNames(i)).Visible = Not wb.Sheets(ShtNames(i)).Visible&lt;br /&gt;
Next i&lt;br /&gt;
&lt;br /&gt;
End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/1052018673702389764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-toggle-hide-unhide-data-sheets.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/1052018673702389764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/1052018673702389764'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-toggle-hide-unhide-data-sheets.html' title='Excel: Toggle Hide Unhide data sheets'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-5080693856541261002</id><published>2009-11-19T15:59:00.000-08:00</published><updated>2009-11-19T15:59:23.630-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Charts"/><title type='text'>Excel Charts: Change Chart Series Type from Bar to Line</title><content type='html'>&#39;--------------------------------------------------------------------------&lt;br /&gt;
&#39; Macro to change Chart Series type to Line&lt;br /&gt;
&#39; For this macro to work properly a bar chart has to be selected&lt;br /&gt;
&#39;--------------------------------------------------------------------------&lt;br /&gt;
Sub ChangeSeriesType_Bar_to_Line()&lt;br /&gt;
  Dim s As Series&lt;br /&gt;
    For Each s In ActiveChart.SeriesCollection&lt;br /&gt;
      With s&lt;br /&gt;
        resp = MsgBox(&quot;Do you want to change series: &quot; &amp; Chr(34) &amp; _&lt;br /&gt;
                       s.Name &amp; Chr(34) &amp; &quot; type from Bar to Line?&quot;, vbYesNo)&lt;br /&gt;
        If resp = vbYes Then&lt;br /&gt;
          .ChartType = xlLineMarkers&lt;br /&gt;
        End If&lt;br /&gt;
      End With&lt;br /&gt;
    Next s&lt;br /&gt;
End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/5080693856541261002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-charts-change-chart-series-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/5080693856541261002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/5080693856541261002'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-charts-change-chart-series-type.html' title='Excel Charts: Change Chart Series Type from Bar to Line'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-8461527438118081747</id><published>2009-11-19T15:25:00.000-08:00</published><updated>2009-11-19T15:29:18.965-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PasteLink Chart Range"/><title type='text'>Excel: Copy Range/Chart to PowerPoint</title><content type='html'>&#39;**************************************************************************&lt;br /&gt;
&#39; Copy Excel Range/Chart to PowerPoint&lt;br /&gt;
&#39; This macro copies a range/chart from Excel to PowerPoint.&lt;br /&gt;
&#39; 1. PowerPoint presentation should be opened for the macro to work properly&lt;br /&gt;
&#39; 2. Macro asks for user input whether to copy a range or chart&lt;br /&gt;
&#39; 3. Then asks whether to paste as Link as picture or link&lt;br /&gt;
&#39; 4. It also makes sure the chart/range fits into PowerPoint slide by adjusting&lt;br /&gt;
&#39;    the height and width of pasted object.&lt;br /&gt;
&#39;**************************************************************************&lt;br /&gt;
Sub Copy_Paste_to_PowerPoint()&lt;br /&gt;
&#39;Requires a reference to the Microsoft PowerPoint Library via the Tools - Reference menu in the VBE&lt;br /&gt;
Dim ppApp As PowerPoint.Application&lt;br /&gt;
Dim ppSlide As PowerPoint.Slide&lt;br /&gt;
&lt;br /&gt;
Dim msg As String&lt;br /&gt;
Dim temp As Variant&lt;br /&gt;
&lt;br /&gt;
Dim PasteChart As Boolean&lt;br /&gt;
Dim PasteChartLink As Boolean&lt;br /&gt;
&lt;br /&gt;
Dim lHeight As Long&lt;br /&gt;
Dim lWidth As Long&lt;br /&gt;
&lt;br /&gt;
&#39;Look for existing instance of PowerPoint&lt;br /&gt;
On Error Resume Next&lt;br /&gt;
Set ppApp = GetObject(, &quot;PowerPoint.Application&quot;)&lt;br /&gt;
On Error GoTo 0&lt;br /&gt;
&lt;br /&gt;
&#39;Sets current slide to active slide&lt;br /&gt;
Set ppSlide = ppApp.ActiveWindow.View.Slide&lt;br /&gt;
&lt;br /&gt;
&#39;Copy Range/Chart?&lt;br /&gt;
temp = MsgBox(&quot;Do you want to Copy-Paste Chart or Range? Yes=Chart ; No=Range&quot;, vbYesNo)&lt;br /&gt;
If temp = 6 Then&lt;br /&gt;
PasteChart = True&lt;br /&gt;
Else&lt;br /&gt;
PasteChart = False&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#39;Pasting a Chart&lt;br /&gt;
If PasteChart = True Then&lt;br /&gt;
Select Case TypeName(Selection)&lt;br /&gt;
&#39;Paste Chart/Charts&lt;br /&gt;
Case &quot;Chart&quot;, &quot;ChartArea&quot;&lt;br /&gt;
&#39;Paste Chart as picture/link?&lt;br /&gt;
temp = MsgBox(&quot;Paste chart as a picture? Yes=Picture ; No=Link&quot;, vbYesNo)&lt;br /&gt;
If temp = 7 Then&lt;br /&gt;
PasteChartLink = True&lt;br /&gt;
Else&lt;br /&gt;
PasteChartLink = False&lt;br /&gt;
End If&lt;br /&gt;
&#39;Copy Paste action&lt;br /&gt;
If PasteChartLink = True Then&lt;br /&gt;
&#39;Copy &amp; Paste Chart Linked&lt;br /&gt;
&#39;ActiveChart.ChartArea.Copy&lt;br /&gt;
Selection.Copy&lt;br /&gt;
ppSlide.Shapes.PasteSpecial(link:=True).Select&lt;br /&gt;
Else&lt;br /&gt;
&#39;Copy &amp; Paste Chart Not Linked&lt;br /&gt;
&#39;ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture&lt;br /&gt;
&#39;ppSlide.Shapes.Paste.Select&lt;br /&gt;
Selection.Copy&lt;br /&gt;
ppSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Select&lt;br /&gt;
End If&lt;br /&gt;
&#39;Paste DrawingObjects (Multiple charts/drawing objects)&lt;br /&gt;
Case &quot;DrawingObjects&quot;&lt;br /&gt;
Selection.Copy&lt;br /&gt;
ppSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Select&lt;br /&gt;
Case Else&lt;br /&gt;
msg = MsgBox(&quot;Select a Chart and run macro&quot;, vbOKOnly, &quot;Select a Chart&quot;)&lt;br /&gt;
&#39;End Sub&lt;br /&gt;
End Select&lt;br /&gt;
&#39;Pasting a Range&lt;br /&gt;
Else&lt;br /&gt;
&#39;Paste Chart as picture/link?&lt;br /&gt;
temp = MsgBox(&quot;Paste Range as a picture? Yes=Picture ; No=Link&quot;, vbYesNo)&lt;br /&gt;
If temp = 7 Then&lt;br /&gt;
PasteRangeLink = False&lt;br /&gt;
Else&lt;br /&gt;
PasteRangeLink = True&lt;br /&gt;
End If&lt;br /&gt;
&#39;Options for Copy &amp; Paste Ranges&lt;br /&gt;
If RangePasteType = True Then&lt;br /&gt;
&#39;Paste Range as Picture&lt;br /&gt;
&#39;Worksheets(SheetName).Range(RangeName).Copy&lt;br /&gt;
Selection.Copy&lt;br /&gt;
ppSlide.Shapes.PasteSpecial(ppPasteMetafilePicture).Select&lt;br /&gt;
Else&lt;br /&gt;
&#39;Paste Range as Picture Link&lt;br /&gt;
&#39;Worksheets(SheetName).Range(RangeName).Copy&lt;br /&gt;
Selection.Copy&lt;br /&gt;
ppSlide.Shapes.PasteSpecial(ppPasteMetafilePicture, link:=msoTrue).Select&lt;br /&gt;
End If&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39; Get the slide height and width.&lt;br /&gt;
lHeight = ppApp.ActivePresentation.PageSetup.SlideHeight&lt;br /&gt;
lWidth = ppApp.ActivePresentation.PageSetup.SlideWidth&lt;br /&gt;
&lt;br /&gt;
&#39; Set Height &amp; Width of pasted object to fit the slide&lt;br /&gt;
If ppApp.ActiveWindow.Selection.ShapeRange.Height &gt; lHeight Then&lt;br /&gt;
ppApp.ActiveWindow.Selection.ShapeRange.Height = lHeight&lt;br /&gt;
End If&lt;br /&gt;
If ppApp.ActiveWindow.Selection.ShapeRange.Width &gt; lWidth Then&lt;br /&gt;
ppApp.ActiveWindow.Selection.ShapeRange.Width = lWidth&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
&#39; Center pasted object in the slide&lt;br /&gt;
ppApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True&lt;br /&gt;
ppApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True&lt;br /&gt;
&lt;br /&gt;
&#39; Activate PowerPoint window&lt;br /&gt;
AppActivate (&quot;Microsoft PowerPoint&quot;)&lt;br /&gt;
Set ppSlide = Nothing&lt;br /&gt;
Set ppApp = Nothing&lt;br /&gt;
&lt;br /&gt;
End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/8461527438118081747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-copy-rangechart-to-powerpoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/8461527438118081747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/8461527438118081747'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/excel-copy-rangechart-to-powerpoint.html' title='Excel: Copy Range/Chart to PowerPoint'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-7306357136000135004</id><published>2009-11-18T21:15:00.000-08:00</published><updated>2009-11-18T21:16:43.979-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="layout ppLayoutTitleOnly"/><title type='text'>PowerPoint: Changing Layout of all slides</title><content type='html'>&#39;*************************************************************&lt;br /&gt;&#39; Changing Slide Layout&lt;br /&gt;&#39; This macro changes the layout of slides in the range stated &lt;br /&gt;&#39; by counter.&lt;br /&gt;&#39; For a list of Layout types (enumerations) check out the &lt;br /&gt;&#39; Enumerations topic&lt;br /&gt;&#39;*************************************************************&lt;br /&gt;&lt;br /&gt;Sub ChangeSlideLayout()&lt;br /&gt;&lt;br /&gt;For i = 1 To ActivePresentation.Slides.Count&lt;br /&gt;  ActivePresentation.Slides(i).Layout = ppLayoutTitleOnly&lt;br /&gt;&lt;br /&gt;Next i&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/7306357136000135004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-changing-layout-of-all.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/7306357136000135004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/7306357136000135004'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-changing-layout-of-all.html' title='PowerPoint: Changing Layout of all slides'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-197511790853854203</id><published>2009-11-18T21:14:00.000-08:00</published><updated>2009-11-18T21:15:17.652-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="resize shapes msoShapeType"/><title type='text'>PowerPoint: Resizing all the Shapes of a particular shape type</title><content type='html'>&#39;*************************************************************&lt;br /&gt;&#39; Resizing all the Shapes of a particular shape type.&lt;br /&gt;&#39; This example sets the height and width of all charts which&lt;br /&gt;&#39; were pasted from Excel into PowerPoint as Linked charts&lt;br /&gt;&#39; This example can be used to format other shape types by &lt;br /&gt;&#39; changing the msoShapeType enumeration.&lt;br /&gt;&#39; For a list of Shape types (enumerations) check out the &lt;br /&gt;&#39; Enumerations topic&lt;br /&gt;&#39;*************************************************************&lt;br /&gt;&lt;br /&gt;Sub SetLinkedChartSize()&lt;br /&gt;Dim s As Slide&lt;br /&gt;Dim shp As Shape&lt;br /&gt;&lt;br /&gt;For Each s In ActivePresentation.Slides&lt;br /&gt;  For Each shp In s.Shapes&lt;br /&gt;    If shp.Type = msoLinkedOLEObject Then&lt;br /&gt;      With shp&lt;br /&gt;        .LockAspectRatio = msoFalse&lt;br /&gt;        .Height = 255&lt;br /&gt;        .Width = 400&lt;br /&gt;      End With&lt;br /&gt;    End If&lt;br /&gt;  Next shp&lt;br /&gt;Next s&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/197511790853854203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-resizing-all-shapes-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/197511790853854203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/197511790853854203'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-resizing-all-shapes-of.html' title='PowerPoint: Resizing all the Shapes of a particular shape type'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-5244900005203437055</id><published>2009-11-18T21:12:00.000-08:00</published><updated>2009-11-18T21:13:14.782-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="format slide titles"/><title type='text'>PowerPoint: Formating Slide Titles on all slides</title><content type='html'>&#39;*************************************************************&lt;br /&gt;&#39; Formating Slide Titles on all slides&lt;br /&gt;&#39; This macro formats the position, Font name and Font size of &lt;br /&gt;&#39; titles on all slides of active presentation&lt;br /&gt;&#39;*************************************************************&lt;br /&gt;Sub FormatSlideTitles()&lt;br /&gt;Dim s As Slide&lt;br /&gt;Dim shp As Shape&lt;br /&gt;&lt;br /&gt;For Each s In ActivePresentation.Slides&lt;br /&gt;  For Each shp In s.Shapes&lt;br /&gt;    If shp.Type = msoPlaceholder Then&lt;br /&gt;      With shp&lt;br /&gt;        .Top = 5&lt;br /&gt;        .TextFrame.TextRange.Font.Name = &quot;Times New Roman&quot;&lt;br /&gt;        .TextFrame.TextRange.Font.Size = 24&lt;br /&gt;      End With&lt;br /&gt;    End If&lt;br /&gt;  Next shp&lt;br /&gt;Next s&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/5244900005203437055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-formating-slide-titles-on.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/5244900005203437055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/5244900005203437055'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-formating-slide-titles-on.html' title='PowerPoint: Formating Slide Titles on all slides'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-1861655325536134236</id><published>2009-11-18T21:07:00.000-08:00</published><updated>2009-11-18T21:11:47.702-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="update links"/><title type='text'>PowerPoint: Update Links to Excel charts and ranges</title><content type='html'>&#39;*************************************************************&lt;br /&gt;&#39;Updating all links of OLE objects embedded in PowerPoint&lt;br /&gt;&#39;This macro is intended to Update charts/Ranges that are &lt;br /&gt;&#39;copy-pasted from Excel into PowerPoint using &quot;Paste Link&quot;&lt;br /&gt;[option of Paste Special menu item&lt;br /&gt;&#39;The macro updates all links in the PowerPoint&lt;br /&gt;&#39;*************************************************************&lt;br /&gt;Sub Update_Links()&lt;br /&gt;    Dim osld As Slide&lt;br /&gt;    Dim oshp As Shape&lt;br /&gt;    For Each osld In ActivePresentation.Slides&lt;br /&gt;        For Each oshp In osld.Shapes&lt;br /&gt;            If oshp.Type = msoLinkedOLEObject Then oshp.LinkFormat.Update&lt;br /&gt;        Next oshp&lt;br /&gt;    Next osld&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/1861655325536134236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-update-links-to-excel-charts.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/1861655325536134236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/1861655325536134236'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-update-links-to-excel-charts.html' title='PowerPoint: Update Links to Excel charts and ranges'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-7505382263631357866</id><published>2009-11-18T20:51:00.000-08:00</published><updated>2009-11-18T20:53:04.703-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Resize Height Width Shapes"/><title type='text'>PowerPoint: Resizing Height and Width of selected shapes</title><content type='html'>&#39;**************************************************************&lt;br /&gt;&#39; Setting the size (Width x Height) of selected shapes with user&lt;br /&gt;&#39; input&lt;br /&gt;&#39; For this macro to work properly, you need to select one or &lt;br /&gt;&#39; more shapes.&lt;br /&gt;&#39; The macro asks for user input to enter Width and Height&lt;br /&gt;&#39; By default, the Input box displays maximum height and width&lt;br /&gt;&#39; of all the selected shapes&lt;br /&gt;&#39;**************************************************************&lt;br /&gt;Sub Resize_Selected_Shapes()&lt;br /&gt;&lt;br /&gt;    Dim shp As Shape&lt;br /&gt;    Dim BoxWidth, BoxHeight As Integer&lt;br /&gt;    &lt;br /&gt;    If ActiveWindow.Selection.Type = ppSelectionNone Then&lt;br /&gt;        MsgBox &quot;Please select objects to resize&quot;, vbExclamation, &quot;Make Selection&quot;&lt;br /&gt;    Else&lt;br /&gt;        &#39; 1st Pass - get the desired width &amp; height&lt;br /&gt;        For Each shp In ActiveWindow.Selection.ShapeRange&lt;br /&gt;            If shp.Width &gt; MaxWidth Then MaxWidth = shp.Width&lt;br /&gt;            If shp.Height &gt; MaxHeight Then MaxHeight = shp.Height&lt;br /&gt;        Next shp&lt;br /&gt;        &lt;br /&gt;        &#39;Get the desired box dimensions - set default as max width &amp; max height&lt;br /&gt;        BoxWidth = InputBox(&quot;Enter the required Width &quot; &amp; Chr(10) &amp; _ &lt;br /&gt; &quot;(Default is Largest Width of selected boxes)&quot;, &quot;Box Width&quot;, MaxWidth)&lt;br /&gt;        BoxHeight = InputBox(&quot;Enter the required Height &quot; &amp; Chr(10) &amp; _&lt;br /&gt; &quot;(Default is Largest Width of selected boxes)&quot;, &quot;Box Height&quot;, MaxHeight)&lt;br /&gt;        &lt;br /&gt;        &#39; 2nd pass - change the sizes&lt;br /&gt;        For Each shp In ActiveWindow.Selection.ShapeRange&lt;br /&gt;            shp.LockAspectRatio = msoFalse&lt;br /&gt;            shp.Width = BoxWidth&lt;br /&gt;            shp.Height = BoxHeight&lt;br /&gt;        Next shp&lt;br /&gt;    End If&lt;br /&gt;    &lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/7505382263631357866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-resizing-height-and-width-of.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/7505382263631357866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/7505382263631357866'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/powerpoint-resizing-height-and-width-of.html' title='PowerPoint: Resizing Height and Width of selected shapes'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7368573915493703872.post-3242661671208145589</id><published>2009-11-16T18:57:00.000-08:00</published><updated>2009-11-18T21:20:34.567-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Word"/><title type='text'>Word: Copying a Range of Cells from Excel into Word</title><content type='html'>&#39;----------------------------------------------------------------------&lt;br /&gt;&#39; Copying a Range of Cells from Excel into Word&lt;br /&gt;&#39;----------------------------------------------------------------------&lt;br /&gt;Sub CopyXLRangeIntoWord()&lt;br /&gt;&lt;br /&gt;Dim strData As String&lt;br /&gt;Dim lngChannel As Long&lt;br /&gt;Dim r As Range&lt;br /&gt;Dim str As String&lt;br /&gt;Dim strFilePath As String&lt;br /&gt;Dim strFileName As String&lt;br /&gt;&lt;br /&gt;str = &quot;R1C1: R21C7&quot; &#39;Specify the Excel range you want to copy&lt;br /&gt;strFilePath = &quot;C:\temp\test.xls&quot;&lt;br /&gt;strFileName = &quot;test.xls&quot;&lt;br /&gt;&lt;br /&gt;&#39;Open a dynamic data exchange (DDE) channel to Excel Application&lt;br /&gt;lngChannel = DDEInitiate(App:=&quot;Excel&quot;, Topic:=&quot;System&quot;)&lt;br /&gt;&lt;br /&gt;&#39;Send OPEN command to Excel through initiated channel&lt;br /&gt;DDEExecute Channel:=lngChannel, Command:=&quot;[OPEN(&quot; &amp; Chr(34) _&lt;br /&gt;    &amp; strFilePath &amp; Chr(34) &amp; &quot;)]&quot;&lt;br /&gt;&lt;br /&gt;&#39;Send COPY command to Excel through initiated channel&lt;br /&gt;DDEExecute Channel:=lngChannel, Command:=&quot;[COPY(&quot; &amp; Chr(34) _&lt;br /&gt;    &amp; &quot;R1C1:R21C7&quot; &amp; Chr(34) &amp; &quot;)]&quot;&lt;br /&gt;  &lt;br /&gt;&#39;Close the DDE channel to Excel&lt;br /&gt;DDETerminate Channel:=lngChannel&lt;br /&gt;&lt;br /&gt;lngChannel = DDEInitiate(App:=&quot;Excel&quot;, Topic:=strFileName)&lt;br /&gt;&lt;br /&gt;&#39;Request information from Excel&lt;br /&gt;strData = DDERequest(Channel:=lngChannel, Item:=str)&lt;br /&gt;&#39;Terminate all channels to Excel&lt;br /&gt;DDETerminateAll&lt;br /&gt;&lt;br /&gt;&#39;Paste Excel range into Word Document&lt;br /&gt;&#39;To Paste as text in the beginning of Word document:&lt;br /&gt;ActiveDocument.Range.InsertBefore strData&lt;br /&gt;&#39; To Paste as Picture in the beginning of Word Document:&lt;br /&gt;&#39;ActiveDocument.Range(End:=0).PasteSpecial DataType:=wdPasteEnhancedMetafile&lt;br /&gt;&lt;br /&gt;End Sub</content><link rel='replies' type='application/atom+xml' href='http://vbacentral.blogspot.com/feeds/3242661671208145589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbacentral.blogspot.com/2009/11/sub-copyxl-dim-strdata-as-dim.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3242661671208145589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7368573915493703872/posts/default/3242661671208145589'/><link rel='alternate' type='text/html' href='http://vbacentral.blogspot.com/2009/11/sub-copyxl-dim-strdata-as-dim.html' title='Word: Copying a Range of Cells from Excel into Word'/><author><name>Bay Blogger</name><uri>http://www.blogger.com/profile/01089303345885942716</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>