<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: VBA: Macro to List all Sheets in a Workbook</title>
	<atom:link href="http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/</link>
	<description>Everything Excel. Only Excel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 07:25:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Stan</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1576</link>
		<dc:creator>Stan</dc:creator>
		<pubDate>Sat, 26 Jun 2010 14:20:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-1576</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-1491&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-1491&quot; rel=&quot;nofollow&quot;&gt;Kris&lt;/a&gt; :&lt;/strong&gt;This is useful. What if I need to get the list of all sheets of a workbook in another workbook?
&lt;/blockquote&gt;


Using code above: (Thanks for it - very useful)

Sub ListSheets()

Dim ws As Worksheet
Dim x As Integer
Dim wb1 As String &#039;workbook you work from
Dim wb2 As String &#039;workbook you want to get list of sheets from

wb1 = ActiveWorkbook.Name
wb2 = &quot;YourBookName.xls&quot; &#039;  &lt;&lt;&lt; Change That

x = 1

Workbooks(wb1).Sheets(&quot;Sheet1&quot;).Range(&quot;A:A&quot;).Clear
Workbooks(wb2).Activate

For Each ws In Worksheets

     Workbooks(wb1).Sheets(&quot;Sheet1&quot;).Cells(x, 1) = ws.Name
     x = x + 1

Next ws

Workbooks(wb1).Activate
Sheets(&quot;Sheet1&quot;).Select

End Sub</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-1491"><p>
<strong><a href="#comment-1491" rel="nofollow">Kris</a> :</strong>This is useful. What if I need to get the list of all sheets of a workbook in another workbook?
</p></blockquote>
<p>Using code above: (Thanks for it &#8211; very useful)</p>
<p>Sub ListSheets()</p>
<p>Dim ws As Worksheet<br />
Dim x As Integer<br />
Dim wb1 As String &#8216;workbook you work from<br />
Dim wb2 As String &#8216;workbook you want to get list of sheets from</p>
<p>wb1 = ActiveWorkbook.Name<br />
wb2 = &#8220;YourBookName.xls&#8221; &#8216;  &lt;&lt;&lt; Change That</p>
<p>x = 1</p>
<p>Workbooks(wb1).Sheets(&quot;Sheet1&quot;).Range(&quot;A:A&quot;).Clear<br />
Workbooks(wb2).Activate</p>
<p>For Each ws In Worksheets</p>
<p>     Workbooks(wb1).Sheets(&quot;Sheet1&quot;).Cells(x, 1) = ws.Name<br />
     x = x + 1</p>
<p>Next ws</p>
<p>Workbooks(wb1).Activate<br />
Sheets(&quot;Sheet1&quot;).Select</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erin</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1545</link>
		<dc:creator>Erin</dc:creator>
		<pubDate>Wed, 09 Jun 2010 22:20:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-1545</guid>
		<description>Thank you so much!  You just saved me about two hours of work!</description>
		<content:encoded><![CDATA[<p>Thank you so much!  You just saved me about two hours of work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1491</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Wed, 07 Apr 2010 14:06:19 +0000</pubDate>
		<guid isPermaLink="false">#comment-1491</guid>
		<description>This is useful. What if I need to get the list of all sheets of a workbook in another workbook?</description>
		<content:encoded><![CDATA[<p>This is useful. What if I need to get the list of all sheets of a workbook in another workbook?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arpad</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1346</link>
		<dc:creator>Arpad</dc:creator>
		<pubDate>Wed, 21 Oct 2009 12:59:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-1346</guid>
		<description>I like it. Very simple. Thanks!

Arpad</description>
		<content:encoded><![CDATA[<p>I like it. Very simple. Thanks!</p>
<p>Arpad</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1189</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 29 Apr 2009 07:01:42 +0000</pubDate>
		<guid isPermaLink="false">#comment-1189</guid>
		<description>Thanks,
Simple, elegant code</description>
		<content:encoded><![CDATA[<p>Thanks,<br />
Simple, elegant code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pavelgee</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-1094</link>
		<dc:creator>pavelgee</dc:creator>
		<pubDate>Tue, 09 Dec 2008 16:12:11 +0000</pubDate>
		<guid isPermaLink="false">#comment-1094</guid>
		<description>Great!
I have been looking for an elegant solution like this!
Saved me about 2-3 hours of copy pasting...</description>
		<content:encoded><![CDATA[<p>Great!<br />
I have been looking for an elegant solution like this!<br />
Saved me about 2-3 hours of copy pasting&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wiz....</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-972</link>
		<dc:creator>wiz....</dc:creator>
		<pubDate>Thu, 23 Oct 2008 19:29:38 +0000</pubDate>
		<guid isPermaLink="false">#comment-972</guid>
		<description>super cool stuff!!!! u where the only 1 to have this code in such a simple manner ....hat off to you..</description>
		<content:encoded><![CDATA[<p>super cool stuff!!!! u where the only 1 to have this code in such a simple manner &#8230;.hat off to you..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.automateexcel.com/2004/09/06/excel_vba_macro_to_list_all_sheets_in_a/comment-page-1/#comment-754</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 08 Sep 2008 15:00:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-754</guid>
		<description>Amazing, you saved an incredible amount of time and enabled me to super organize my workbook.  Thank you!!!!!</description>
		<content:encoded><![CDATA[<p>Amazing, you saved an incredible amount of time and enabled me to super organize my workbook.  Thank you!!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

