<?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/">


<channel>
			<title><![CDATA[文章分類: WB & WS (Emily 分享學習 VBA)]]></title>
	<description><![CDATA[WorkBook and WorkSheet]]></description>
	<link>http://cat14051.mysinablog.com/index.php?op=ArticleListing&amp;postCategoryId=11247</link>

<lastBuildDate>Mon, 13 Apr 2009 12:09:26 +0800</lastBuildDate>

<generator>mysinablog-2.0</generator>

<image>
	<url>http://mysinablog.com/gallery/202/23/6090/profile.jpg</url>

	<title><![CDATA[文章分類: WB & WS (Emily 分享學習 VBA)]]></title>
	<link>http://cat14051.mysinablog.com/index.php?op=ArticleListing&amp;postCategoryId=11247</link>
</image>


<item>
<title><![CDATA[如何取得凍窗格的位置]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">如何取得凍窗格的位置</font></p><p>例如選擇D3後凍結窗格 , 如何用VBA得到D3這個地址？</p><p>如果沒有隱藏 (A, B, C column),  可用 </p><p>ActiveWindow.SplitRow + 1</p><p>ActiveWindow.SplitColumn  + 1</p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1666650" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1666650</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1666650</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1666650</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Mon, 13 Apr 2009 12:09:26 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[VBA 清除立即窗口内容]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">VBA 清除立即窗口内容</font></p><p><font size="2"><span style="color: #0000ff"><font color="#0000ff">Sub</font></span> DelInImmedate()<br />    Debug.Print Now<br />    Application.SendKeys "^g ^a {DEL}"<br /><font color="#0000ff"><span style="color: #0000ff">End</span> <span style="color: #0000ff">Sub</span></font></font></p><p>API Method: <a href="http://www.dailydoseofexcel.com/archives/2004/06/09/clear-the-immediate-window/">http://www.dailydoseofexcel.com/archives/2004/06/09/clear-the-immediate-window/</a></p><p>&nbsp;</p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1588409</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1588409</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=1588409</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Sun, 22 Feb 2009 00:20:07 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[顯示自定檢視模式名稱 CurrentViews]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">顯示自定檢視模式名稱 CurrentViews</font></p><font size="2"><span style="color: #0000ff"><font color="#0000ff">Function</font></span> CurrentView(<span style="color: #0000ff"><font color="#0000ff">Optional</font></span> DummyArg As <span style="color: #0000ff"><font color="#0000ff">Variant</font></span>) As <span style="color: #0000ff"><font color="#0000ff">String</font></span><br /><span style="color: #0000ff"><font color="#0000ff">Dim</font></span> cbo As CommandBarComboBox<br />  <br /><font color="#0000ff"><span style="color: #0000ff">On</span> <span style="color: #0000ff">Error</span> <span style="color: #0000ff">Resume</span> <span style="color: #0000ff">Next</span></font><br /><span style="color: #0000ff"><font color="#0000ff">Set</font></span> cbo = Application.CommandBars.FindControl(ID:=950)<br /><br /><font color="#0000ff"><span style="color: #0000ff">On</span> <span style="color: #0000ff">Error</span> <span style="color: #0000ff">GoTo</span></font> 0<br /><span style="color: #0000ff"><font color="#0000ff">If</font></span> cbo <font color="#0000ff"><span style="color: #0000ff">Is</span> <span style="color: #0000ff">Nothing</span> <span style="color: #0000ff">Then</span></font><br />    <span style="color: #0000ff"><font color="#0000ff">With</font></span> Application.CommandBars.Add(Temporary:=True)<br />        <span style="color: #0000ff"><font color="#0000ff">Set</font></span> cbo = .Controls.Add(ID:=950)<br />        .Enabled = <span style="color: #0000ff"><font color="#0000ff">False</font></span><br />    <font color="#0000ff"><span style="color: #0000ff">End</span> <span style="color: #0000ff">With</span></font><br /><font color="#0000ff"><span style="color: #0000ff">End</span> <span style="color: #0000ff">If</span><br /></font><br />CurrentView = cbo.Text<br /><br /><font color="#0000ff"><span style="color: #0000ff">End</span> <span style="color: #0000ff">Function</span><br /></font></font><font size="2"><p><span style="color: #0000ff"><font color="#0000ff">Sub</font></span> Test()<br /><font color="#008000">    <span style="color: #007f00">'Application.DisplayStatusBar = True</span><br />    <span style="color: #007f00">'Application.StatusBar = CurrentView</span><br /></font>    MsgBox CurrentView<br /><font color="#0000ff"><span style="color: #0000ff">End</span> <span style="color: #0000ff">Sub</span></font><br /><a href="http://cat14051.mysinablog.com/resserver.php?blogId=6090&amp;resource=1101485-CurrentView.GIF"></a></p></font>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=936173</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=936173</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=936173</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Thu, 03 Jan 2008 13:34:54 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[移動 Mouse 定位在 A8]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">移動 Mouse 定位在 A8</font></p><font size="2"><font color="#008000"><span>'---------------------------------------------------------------------------------------</span><br /><span>' Module&nbsp;&nbsp;&nbsp;&nbsp;: Module1</span><br /><span>' DateTime&nbsp;&nbsp;:</span><br /><span>' Author&nbsp;&nbsp;&nbsp;&nbsp;: Colo</span><br /><span>' Purpose&nbsp;&nbsp; : Set Cursor Position</span><br /><span>'---------------------------------------------------------------------------------------</span></font><br /><br /><font color="#0000ff"><span>Public</span> <span>Declare</span> <span>Function</span></font> SetCursorPos <span><font color="#0000ff">Lib</font></span> &quot;user32&quot; (<span><font color="#0000ff">ByVal</font></span> X <font color="#0000ff"><span>As</span> <span>Long</span></font>, <span><font color="#0000ff">ByVal</font></span> Y<font color="#0000ff"> <span>As</span> <span>Long</span></font>)<font color="#0000ff"> <span>As</span> <span>Long</span><br /></font></font><font size="2"><p><span><font color="#0000ff">Sub</font></span> CursorPosition()<br />&nbsp;&nbsp;&nbsp;<font color="#0000ff">&nbsp;<span>Dim</span></font> X As<font color="#0000ff"> <span>Long</span></font>, Y As <span><font color="#0000ff">Long</font></span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span><font color="#0000ff">Dim</font></span> Rg As Range<br />&nbsp;&nbsp;&nbsp;&nbsp;<span><font color="#0000ff">Set</font></span> Rg = Range(&quot;A8&quot;)<br />&nbsp;&nbsp;&nbsp;&nbsp;X = ActiveWindow.PointsToScreenPixelsX((Rg.Left) * 96 / 72 * ActiveWindow.Zoom / 100)<br />&nbsp;&nbsp;&nbsp;&nbsp;Y = ActiveWindow.PointsToScreenPixelsY((Rg.Top) * 96 / 72 * ActiveWindow.Zoom / 100)<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000"><span>' 72 (points per inch) is divided by a 96 (pixels per inch),</span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span>' then multiplied the percentage of the ActiveWindow.Zoom.</span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span>' Please note, a 96 /inch is a standard pixel resolution,</span><br />&nbsp;&nbsp;&nbsp;&nbsp;<span>' so depending on the case, this coefficient must be changed to suit.</span></font><br />&nbsp;&nbsp;&nbsp;&nbsp;SetCursorPos X, Y<br /><font color="#0000ff"><span>End</span> <span>Sub</span></font><br /><br /></p></font><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=648434" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=648434</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=648434</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=648434</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Sun, 24 Jun 2007 23:35:48 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[列出一個工作簿中所有已使用的自定義函數]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">列出一個工作簿中所有已使用的自定義函數</font> </p><p><a href="http://club.excelhome.net/dispbbs.asp?boardid=2&amp;id=243094">ExcelHome Question</a></p><p>&nbsp;</p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=604119" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=604119</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=604119</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=604119</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Tue, 29 May 2007 13:39:45 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[把嵌入 Excel / Word 文件的 Flash 提取出來]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">把嵌入 Excel / Word 文件的 Flash 提取出來</font></p><p><a href="http://club.excelhome.net/dispbbs.asp?boardID=2&amp;ID=237225&amp;page=1&amp;px=0">ExcelHome Question</a></p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=555049" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=555049</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=555049</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=555049</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Sun, 29 Apr 2007 22:21:29 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[Data Encryption example]]></title>

	<description><![CDATA[<p><font size="4" color="#800000">Data Encryption example</font></p><p>&nbsp;<a href="http://www.blog.methodsinexcel.co.uk/2007/01/19/data-encryption-workbook/">http://www.blog.methodsinexcel.co.uk/2007/01/19/data-encryption-workbook/</a></p><blockquote><p>You can drop your data on to the worksheet (you can add extra worksheets too if you like) and then encrypt the data with the press of a button. You will be asked to provide a key, which you must remember. Save the file and send it out.</p><p>The receiver can then contact you for the key. When they click the decrypt button it will ask them for the key, if they enter it correctly it will return the original data. If they enter the wrong key the data will be encrypted again.</p><p>I have not tested this much, so make sure you back up your originals and remember there is not such thing a truly save data!</p><p>If you have any questions or suggestions drop me a comment.</p><p>Enjoy!</p></blockquote><p>&nbsp;</p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=458130</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=458130</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=458130</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Mon, 19 Feb 2007 11:57:39 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[複活節怎麽算]]></title>

	<description><![CDATA[<p><span style="font-size: 12pt; font-family: 新細明體"><font size="4" color="#800000">複活節怎麽算</font></span></p><p><span style="font-size: 12pt; font-family: 新細明體"><font size="2">天 主 教 教 區 禮 儀 委 員 會 主 席 羅 國 輝 神 父 解 釋 說 ， 教 會 計 算 復 活 節 的 方 法 ， 其 實 是 訂 定 在 春 分 之 後 ， 首 次 月 圓 日 後 的 第 一 個 主 日 （ 星 期 日 ） ， 如 果 月 圓 那 天 剛 好 是 星 期 日 ， 那 復 活 節 則 順 延 一 個 星 期 。 好 像 以 今 年 來 說 ， 春 分 在 3 月 20 日 ， 春 分 後 首 個 月 圓 日 是 3 月 24 日 ， 其 後 的 第 一 個 星 期 日 ， 就 是 3 月 27 日 ！ </font></span></p><p><span style="font-size: 12pt; font-family: 新細明體"></span></p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=375265" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=375265</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=375265</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=375265</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Tue, 19 Dec 2006 23:12:19 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[更改 Excel Codename]]></title>

	<description><![CDATA[<p><font color="#990000" size="4"><font color="#990000">更改</font>&nbsp;Excel Codename</font></p><p><font size="2"><font color="#0000ff">Sub</font> RenameSheetCodeName()<br /><font color="#0000ff">On Error GoTo</font> ErrChg<br /><font color="#0000ff">With</font> ActiveSheet<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#009900">'.Name = &quot;Sheet1&quot;<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;.Parent.VBProject.vbComponents(.CodeName).Properties(&quot;_CodeName&quot;) = &quot;Sheet1&quot;<br /><font color="#0000ff">End With<br />Exit Sub<br /></font>ErrChg:<br />MsgBox Err.Number &amp; &quot;:=&quot; &amp; Err.Description, vbCritical<br /><font color="#0000ff">End Sub</font></font></p><p><font size="2"><span /></font><a href="http://cat14051.mysinablog.com/resserver.php?blogId=6090&amp;resource=303265-%E6%9C%AA%E5%91%BD%E5%90%8D.JPG"><img alt="CodeName" hspace="5" src="http://cat14051.mysinablog.com/resserver.php?blogId=6090&amp;resource=303265-%E6%9C%AA%E5%91%BD%E5%90%8D.JPG&amp;mode=medium" vspace="5" border="0" /></a><br /></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=277188</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=277188</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=277188</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Fri, 29 Sep 2006 11:08:34 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[Cell Charting (2)]]></title>

	<description><![CDATA[<p><font color="#990000" size="4">Cell Charting</font></p><p><font size="2">Scaled-in-cell-charting</font></p><p><a href="http://www.dailydoseofexcel.com/archives/2006/09/13/scaled-in-cell-charting/">http://www.dailydoseofexcel.com/archives/2006/09/13/scaled-in-cell-charting/</a></p><p><img alt="emoticon" src="http://www.mysinablog.com/js/tiny_mce/plugins/emotions/images/1/16.gif" border="0" /></p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=264286" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=264286</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=264286</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=264286</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Fri, 15 Sep 2006 14:03:01 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[如何判斷一個 xls 文檔是用那個版本的 Office 程式生成的]]></title>

	<description><![CDATA[<p><font color="#990000" size="4">如何判斷一個 xls 文檔是用那個版本的 Office</font></p><p><font size="2">MsgBox ThisWorkbook.CalculationVersion</font></p><p><font size="2">獲取一個數字，該數字指示上次對工作簿進行完全重新計算的 Excel 的版本。最右邊四位是計算引擎的次版本号，其他位（左邊）是 Microsoft Office Excel 的主版本。&nbsp;</font></p><p><font size="2">例子</font></p><p><font size="2"><font color="#ff00ff">11</font>4210&nbsp; </font></p><p><font size="2">11 是 Excel 11, i.e. Excel 2003</font></p><p><font size="2"><font color="#ff00ff">9</font>2512</font></p><p><font size="2">9 是 Excel 9</font></p><p><font size="2">0</font></p><p><font size="2">沒有進行過計算是 0 !!!</font></p><p><font size="2">Excel 97: 8<br />Excel XP:&nbsp;10</font></p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=233266" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=233266</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=233266</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=233266</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Sat, 12 Aug 2006 20:43:10 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[Excel 儲存副本 增益集]]></title>

	<description><![CDATA[<p><font color="#990000" size="4">可以將副本指定到其他路徑甚至網路磁碟機並且副檔名為 .xls</font></p><p><span style="font-size: 12px">沙拉油 Blog </span><a href="http://blog.xuite.net/saladoil/excel/7055499">http://blog.xuite.net/saladoil/excel/7055499</a></p><p>&nbsp;</p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=226586</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=226586</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=226586</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Sat, 05 Aug 2006 10:40:15 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[如何判斷一個檔案內是否包含宏]]></title>

	<description><![CDATA[<p><font color="#990000" size="4">如何判斷一個檔案內是否包含宏</font></p><p><font size="2">&nbsp;</font><font size="2"><font color="#0000ff">Sub</font> Check_VBA_Exist()<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> fd As FileDialog<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> FFs As FileDialogFilters<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> stFileName As <font color="#0000ff">String</font><br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff"><font color="#0000ff">Dim</font></font> vaItem<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> VBC As <font color="#0000ff">Object<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> HasCode As <font color="#0000ff">Boolean</font><br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Dim</font> wb As Workbook<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Set</font> fd = Application.FileDialog(msoFileDialogOpen)<br />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">With</font> fd<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Set</font> FFs = .Filters<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">With</font> FFs<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Clear<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Add &quot;Excel文件&quot;, &quot;*.xls;*.xla&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">End With</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.AllowMultiSelect = <font color="#0000ff">True<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If</font> .Show = -1 <font color="#0000ff">Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For Each</font> vaItem <font color="#0000ff">In</font> .SelectedItems<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.EnableEvents = <font color="#0000ff">False</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.ScreenUpdating = <font color="#0000ff">False<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set</font> wb = Workbooks.Open(vaItem)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HasCode = <font color="#0000ff">False</font></font></p><p><font size="2"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff00ff">'&nbsp;&nbsp;当档案有工程密码是,出错 ,&nbsp;amended on&nbsp;30 Jul 2006</font></font></font></p><p><font size="2"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If<font color="#000000"> wb.VBProject.Protection = 1 </font>Then<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;</font>' 判斷vbe是否保護<br /><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;檔案&quot; &amp; Dir(vaItem) &amp; &quot; VBA 專案被鎖定&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wb.Close 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font><font color="#009900">' <strike>Exit Sub<br /></strike>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' <strike>End If</strike></font></font></p><p><font size="2"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else</font></font></p><p><font size="2"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each</font> VBC <font color="#0000ff">In</font> wb.VBProject.VBComponents<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">If</font> VBC.Type &lt;&gt; 100 <font color="#0000ff">Then<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HasCode = True: <font color="#0000ff">Exit For<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ElseIf</font> VBC.CodeModule.CountOfDeclarationLines &lt; VBC.CodeModule.CountOfLines <font color="#0000ff">Then</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HasCode = True: <font color="#0000ff">Exit For<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If</font> HasCode = <font color="#0000ff">True Then</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;檔案&quot; &amp; Dir(vaItem) &amp; &quot; 有宏&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">Else<br /></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;檔案&quot; &amp; Dir(vaItem) &amp; &quot; 無宏&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">End If</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wb.Close 0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.EnableEvents = <font color="#0000ff">True</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.ScreenUpdating = <font color="#0000ff">True</font></font></p><p><font size="2"><font color="#0000ff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next</font> vaItem<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff">End If<br />&nbsp;&nbsp;&nbsp;&nbsp;End With<br />End Sub</font></font><br /></p><p>Ref: <a href="http://www.officefans.net/cdb/viewthread.php?tid=39838&amp;extra=page%3D1">http://www.officefans.net/cdb/viewthread.php?tid=39838&amp;extra=page%3D1</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=210827</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=210827</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=210827</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Tue, 18 Jul 2006 10:32:16 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[合并格行高]]></title>

	<description><![CDATA[<p><font color="#990000" size="4">合并格行高</font></p><p><font color="#0000ff">&nbsp;</font><font size="2"><font color="#0000ff"><span style="#0000ff">Private</span> <span style="#0000ff">Sub</span></font> MergeCell_AutoHeight()<br /><br /><span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Dim</font></span></span> snCurrRowH As <span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Single</font></span></span>, MergedCellRgWidth As <span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Single</font></span></span><br /><span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Dim</font></span></span> CurrCell As Range<br /><span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Dim</font></span></span> ActiveCellWidth As <span style="#0000ff"><font color="#0000ff">Single</font></span>, PossNewRowHeight As <span style="#0000ff"><span style="#0000ff"><font color="#0000ff">Single</font></span></span><br /><span style="#0000ff"><font color="#0000ff">Dim</font></span> stCell As <font color="#0000ff"><span style="#0000ff">String</span><br /></font><br /><span style="#0000ff"><font color="#0000ff">With</font></span> ActiveCell.MergeArea<br />&nbsp;&nbsp;&nbsp;&nbsp;<span style="#0000ff"><font color="#0000ff">If</font></span> .Rows.Count = 1 And .WrapText = <font color="#0000ff"><span style="#0000ff">True</span> <span style="#0000ff">Then</span></font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.ScreenUpdating = <span style="#0000ff"><font color="#0000ff">False</font></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;snCurrRowH = .RowHeight<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ActiveCellWidth = ActiveCell.ColumnWidth<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff"><span style="#0000ff">For</span> <span style="#0000ff">Each</span></font> CurrCell <span style="#0000ff"><font color="#0000ff">In</font></span> Selection<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MergedCellRgWidth = CurrCell.ColumnWidth + MergedCellRgWidth<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="#0000ff"><font color="#0000ff">Next</font></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MergeCells = <span style="#0000ff"><font color="#0000ff">False</font></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cells(1).ColumnWidth = MergedCellRgWidth<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EntireRow.AutoFit<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PossNewRowHeight = .RowHeight<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cells(1).ColumnWidth = ActiveCellWidth<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .MergeCells = <span style="#0000ff"><font color="#0000ff">True</font></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .RowHeight = IIf(snCurrRowH &gt; PossNewRowHeight, snCurrRowH, PossNewRowHeight)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000ff"><span style="#0000ff">End</span> <span style="#0000ff">If</span><br /><span style="#0000ff">End</span> <span style="#0000ff">With</span><br /><br /><span style="#0000ff">End</span> <span style="#0000ff">Sub</span></font></font><br /></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=205782</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=205782</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=205782</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Tue, 11 Jul 2006 23:36:44 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>


<item>
<title><![CDATA[Almost-Langford numbers ]]></title>

	<description><![CDATA[<p><span class="postbody"><font color="#990000" size="4">Almost-Langford numbers</font> </span></p><p><span class="postbody">Self-describing numbers: between two digits &quot;d&quot; there are d digits. Almost-Langford numbers have an even number of digits and no two identical pairs of digits. </span></p><p><span class="postbody">Please read <a href="http://www.research.att.com/~njas/sequences/A108116" target="_blank"><font color="#304c6c">http://www.research.att.com/~njas/sequences/A108116</font></a> </span></p><p><span class="postbody">Full List in Excel</span></p><p><a href="http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=204267" target="_blank">(閱讀全文)</a></p>]]></description>

<link>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=204267</link>
<comments>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=204267</comments>
<guid>http://cat14051.mysinablog.com/index.php?op=ViewArticle&amp;articleId=204267</guid>

<dc:creator><![CDATA[cat14051]]></dc:creator>

		<category><![CDATA[WB & WS]]></category>

<pubDate>Mon, 10 Jul 2006 01:25:01 +0800</pubDate>

	<source url="http://cat14051.mysinablog.com/rss.php&amp;categoryId=11247"><![CDATA[WB & WS (Emily 分享學習 VBA)]]></source>

</item>

</channel>
</rss>