{"id":49,"date":"2024-09-27T07:58:03","date_gmt":"2024-09-26T23:58:03","guid":{"rendered":"https:\/\/lilia-study.com\/lang\/eng\/?p=49"},"modified":"2024-09-27T07:58:13","modified_gmt":"2024-09-26T23:58:13","slug":"open","status":"publish","type":"post","link":"https:\/\/lilia-study.com\/lang\/chs\/excel\/excel-vba\/book\/open\/","title":{"rendered":"Excel VBA \u5de5\u4f5c\u7c3f\u6253\u5f00-Open"},"content":{"rendered":"<p><!-- wp:html --><\/p>\n<p><span class=\"icon_point color01\"><\/span>&nbsp;\u672c\u6587\u7531\u65e5\u6587\u8bd1\u6210\u4e2d\u6587\u3002<\/p>\n<p><!-- \/wp:html --><\/p>\n\n\n\n\n<p>\u8981\u5728 Excel VBA \u4e2d\u6253\u5f00\u4e00\u672c\u4e66\uff0c\u8bf7\u4f7f\u7528 &#8220;Workbooks.Open&#8221; \u65b9\u6cd5<\/p>\n\n\n<p><!-- wp:html --><\/p>\n<p style=\"margin-bottom:0;padding-bottom:0;\">&lt;&nbsp;Sponsored Links&nbsp;&gt;<\/p>\n<p><script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- lilia top --><br \/>\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-4504956686889525\" data-ad-slot=\"2727563599\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins><br \/>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><br \/>\n<!-- \/wp:html --><\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">\u53e5\u6cd5 &#8220;Open&#8221;<\/h2>\n\n\n\n<div class=\"box_style box_style_orange\">\n<div class=\"box_inner\">\n<p class=\"b big\">expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)<\/p>\n<\/div>\n<\/div>\n\n\n\n<p><strong>FileName<\/strong> \uff1d \u8981\u6253\u5f00\u7684\u56fe\u4e66\u540d\u79f0<br><strong>UpdateLinks<\/strong> \uff1d \u5982\u4f55\u66f4\u65b0\u6587\u4ef6\u4e2d\u7684\u94fe\u63a5<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1 = \u7528\u6237\u6307\u5b9a\u5982\u4f55\u66f4\u65b0\u94fe\u63a5<\/li>\n\n\n\n<li>2 = \u6253\u5f00\u56fe\u4e66\u65f6\u4e0d\u5237\u65b0\u94fe\u63a5<\/li>\n\n\n\n<li>3 = \u6253\u5f00\u4e66\u7c4d\u65f6\u59cb\u7ec8\u5237\u65b0\u94fe\u63a5<\/li>\n<\/ul>\n\n\n\n<p><strong>ReadOnly<\/strong> \uff1d \u6307\u5b9a &#8220;True&#8221; \u4ee5\u53ea\u8bfb\u6a21\u5f0f\u6253\u5f00\u56fe\u4e66<br><strong>Format<\/strong> \uff1d \u6253\u5f00\u6587\u672c\u6587\u4ef6\u65f6\u6307\u5b9a\u5206\u9694\u7b26<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1 = TAB<\/li>\n\n\n\n<li>2 = comma (,)<\/li>\n\n\n\n<li>3 = space<\/li>\n\n\n\n<li>4 = semicolon (;)<\/li>\n\n\n\n<li>5 = None<\/li>\n\n\n\n<li>6 = custom character<\/li>\n<\/ul>\n\n\n\n<p>\u6211\u4e0d\u4f7f\u7528\u4efb\u4f55\u5176\u4ed6 &#8220;arguments&#8221;\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528 VBA \u6253\u5f00\u4e00\u672c\u4e66\u7684\u793a\u4f8b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u6253\u5f00\u4e00\u672c\u4e66<\/h3>\n\n\n\n<p>\u6253\u5f00 D \u76d8 &#8220;test&#8221; \u6587\u4ef6\u5939\u4e2d\u7684 &#8220;aaa.xlsx&#8221;\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover bdr_gray\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.5rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(1 * 0.6 * 1.5rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.8rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Sub BookOpenTest1()\n\u3000\u3000Workbooks.Open Filename:=&quot;D:\\test\\aaa.xlsx&quot;\nEnd Sub\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">BookOpenTest1<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000Workbooks.Open Filename:=<\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee5\u53ea\u8bfb\u65b9\u5f0f\u6253\u5f00\u56fe\u4e66<\/h3>\n\n\n\n<p>\u4ee5\u53ea\u8bfb\u65b9\u5f0f\u6253\u5f00 D \u76d8 &#8220;test&#8221;\u6587\u4ef6\u5939\u4e2d\u7684 &#8220;aaa.xlsx&#8221; \u6587\u4ef6\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover bdr_gray\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.5rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(1 * 0.6 * 1.5rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.8rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Sub BookOpenTest2()\n\u3000\u3000Workbooks.Open Filename:=&quot;D:\\test\\aaa.xlsx&quot;, ReadOnly:=True\nEnd Sub\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">BookOpenTest2<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000Workbooks.Open Filename:=<\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #001080\"> ReadOnly<\/span><span style=\"color: #000000\">:=<\/span><span style=\"color: #0000FF\">True<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6253\u5f00\u53d7\u5bc6\u7801\u4fdd\u62a4\u7684\u6587\u4ef6<\/h3>\n\n\n\n<p>\u6253\u5f00 D \u76d8 &#8220;test&#8221; \u6587\u4ef6\u5939\u4e2d\u7684\u6587\u4ef6 &#8220;aaa.xlsx&#8221;\uff0c\u8bfb\u53d6\u5bc6\u7801\u8bbe\u7f6e\u4e3a &#8220;bbb&#8221;\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover bdr_gray\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.5rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(1 * 0.6 * 1.5rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.8rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Sub BookOpenTest3()\n\u3000\u3000Workbooks.Open Filename:=&quot;D:\\test\\aaa.xlsx&quot;, Password:=&quot;bbb&quot;\nEnd Sub\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">BookOpenTest3<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000Workbooks.Open Filename:=<\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #001080\"> Password<\/span><span style=\"color: #000000\">:=<\/span><span style=\"color: #A31515\">&quot;bbb&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728\u5e76\u6253\u5f00\u3002<\/h3>\n\n\n\n<p>D \u76d8\u7684 &#8220;test&#8221; \u6587\u4ef6\u5939\u4e2d\u662f\u5426\u6709 &#8220;aaa.xlsx&#8221;\uff1f<br>\u3000\u5982\u679c\u5b58\u5728\uff0c\u8bf7\u6253\u5f00\u3002<br>\u3000\u5982\u679c\u4e0d\u5b58\u5728\uff0c\u5c06\u663e\u793a\u4e00\u6761\u4fe1\u606f\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover bdr_gray\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.5rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(1 * 0.6 * 1.5rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.8rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Sub BookOpenTest4()\n\u3000\u3000If Dir(&quot;D:\\test\\aaa.xlsx&quot;) &lt;&gt; &quot;&quot; Then\n\u3000\u3000\u3000\u3000Workbooks.Open Filename:=&quot;D:\\test\\aaa.xlsx&quot;\n\u3000\u3000Else\n\u3000\u3000\u3000\u3000MsgBox &quot;D:\\test\\aaa.xlsx \u4e0d\u5b58\u5728&quot;\n\u3000\u3000End If\nEnd Sub\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">BookOpenTest4<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000<\/span><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">Dir<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><span style=\"color: #000000\">) &lt;&gt; <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000\u3000\u3000Workbooks.Open Filename:=<\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000<\/span><span style=\"color: #AF00DB\">Else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000\u3000\u3000<\/span><span style=\"color: #795E26\">MsgBox<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx \u4e0d\u5b58\u5728&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u3000\u3000<\/span><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u8a18\u8ff0\u3060\u3068\u30d1\u30b9\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u4f55\u5ea6\u3082\u8a18\u8ff0\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u30d1\u30b9\u3068\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5909\u6570\u306b\u5165\u308c\u3066\u307f\u307e\u3059<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers cbp-highlight-hover bdr_gray\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:1.5rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#000000;--cbp-line-number-width:calc(2 * 0.6 * 1.5rem);--cbp-line-highlight-color:rgba(0, 0, 0, 0.2);line-height:1.8rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"Sub BookOpenTest5()\n\tDim BookName As String\n\n\tBookName = &quot;D:\\test\\aaa.xlsx&quot;\n\n\tIf Dir(BookName) &lt;&gt; &quot;&quot; Then\n\t\tWorkbooks.Open Filename:=BookName\n\tElse\n\t\tMsgBox BookName &amp; &quot; \u4e0d\u5b58\u5728&quot;\n\tEnd If\nEnd Sub\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">BookOpenTest5<\/span><span style=\"color: #000000\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #0000FF\">Dim<\/span><span style=\"color: #001080\"> BookName <\/span><span style=\"color: #000000\">As <\/span><span style=\"color: #267F99\">String<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #001080\">BookName<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;D:\\test\\aaa.xlsx&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">Dir<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">BookName<\/span><span style=\"color: #000000\">) &lt;&gt; <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t\tWorkbooks.Open Filename:=<\/span><span style=\"color: #001080\">BookName<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #AF00DB\">Else<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t\t<\/span><span style=\"color: #795E26\">MsgBox<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">BookName<\/span><span style=\"color: #000000\"> &amp; <\/span><span style=\"color: #A31515\">&quot; \u4e0d\u5b58\u5728&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\t<\/span><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n<p><!-- wp:html --><\/p>\n<p style=\"margin-bottom:0;padding-bottom:0;\">&lt;&nbsp;Sponsored Links&nbsp;&gt;<\/p>\n<p><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4504956686889525\"\n     crossorigin=\"anonymous\"><\/script><br \/>\n<!-- lilia bottom --><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:336px;height:280px\"\n     data-ad-client=\"ca-pub-4504956686889525\"\n     data-ad-slot=\"7848928897\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><br \/>\n<!-- \/wp:html --><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u5728 Excel VBA \u4e2d\u6253\u5f00\u4e00\u672c\u4e66\uff0c\u8bf7\u4f7f\u7528 &#8220;Workbooks.Open&#8221; \u65b9\u6cd5 \u53e5\u6cd5 &#8220;Open&#8221; expression.Open(FileName, Update [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,1,2],"tags":[],"class_list":{"0":"post-49","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-book","7":"category-excel","8":"category-excel-vba"},"_links":{"self":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":0,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"wp:attachment":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}