{"id":1168,"date":"2022-10-25T11:08:00","date_gmt":"2022-10-25T11:08:00","guid":{"rendered":"https:\/\/262235.xyz\/?p=1168"},"modified":"2022-10-25T11:08:00","modified_gmt":"2022-10-25T11:08:00","slug":"1168","status":"publish","type":"post","link":"https:\/\/lyvba.com\/index.php\/2022\/10\/25\/1168\/","title":{"rendered":"[\u5fae\u8f6f\u4e2d\u6587\u6587\u6863] 64 \u4f4d Visual Basic for Applications \u6982\u8ff0"},"content":{"rendered":"<h1><a href=\"https:\/\/learn.microsoft.com\/zh-cn\/office\/vba\/language\/concepts\/getting-started\/64-bit-visual-basic-for-applications-overview#writing-code-that-works-on-both-32-bit-and-64-bit-office\">\u5fae\u8f6f\u4e2d\u6587\u6587\u6863 64 \u4f4d Visual Basic for Applications \u6982\u8ff0<\/a><\/h1>\n<h3>\u672c\u6587\u5185\u5bb9<\/h3>\n<p>Microsoft Visual Basic for Applications (VBA) \u662f\u968f Microsoft Office \u4e00\u8d77\u63d0\u4f9b\u7684 Visual<br \/>Basic \u7248\u672c\u3002 \u5728 Microsoft Office 2010 \u4e2d\uff0cVBA \u5305\u62ec\u4f7f VBA \u4ee3\u7801\u80fd\u591f\u5728 32 \u4f4d\u548c 64 \u4f4d\u73af\u5883\u4e2d\u6b63\u5e38\u8fd0\u884c\u7684\u8bed\u8a00\u529f\u80fd\u3002<\/p>\n<p>\u5907\u6ce8<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOffice 2010\u30012013 \u548c 2016 \u7248\u5c06\u5b89\u88c5 32 \u4f4d\u7248\u672c\u3002 \u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5fc5\u987b\u663e\u5f0f\u9009\u62e9\u5b89\u88c5 64 \u4f4d\u7248\u672c\u3002 \u4ece Office<br \/>2019 \u548c Microsoft 365 \u5f00\u59cb\uff0c\u9ed8\u8ba4\u4e3a 64 \u4f4d\u7248\u672c\u3002<\/p>\n<p>\u5982\u679c\u672a\u5c06\u5728 Office 2010 \u7248\u672c\uff08VBA \u7248\u672c 6 \u548c\u65e9\u671f\u7248\u672c\uff09\u4e4b\u524d\u7f16\u5199\u7684 VBA \u4ee3\u7801\u4fee\u6539\u4e3a\u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e0a\u8fd0\u884c\uff0c\u5219\u5728 64<br \/>\u4f4d\u5e73\u53f0\u4e0a\u8fd0\u884c\u6b64\u4ee3\u7801\u4f1a\u5bfc\u81f4\u51fa\u73b0\u9519\u8bef\u3002 \u5bfc\u81f4\u8fd9\u4e9b\u9519\u8bef\u7684\u539f\u56e0\u662f\uff0cVBA \u7248\u672c 6 \u548c\u65e9\u671f\u7248\u672c\u9690\u5f0f\u9762\u5411 32 \u4f4d\u5e73\u53f0\u4e14\u901a\u5e38\u5305\u542b\u4f7f\u7528\u6307\u9488\u548c\u53e5\u67c4\u7684 32 \u4f4d\u6570\u636e\u7c7b\u578b\u8c03\u5165<br \/>Windows API \u7684 **[Declare \u8bed\u53e5](..\/..\/reference\/user-interface-help\/declare-<br \/>statement)** \u3002 \u7531\u4e8e VBA \u7248\u672c 6 \u548c\u65e9\u671f\u7248\u672c\u6ca1\u6709\u6307\u9488\u6216\u53e5\u67c4\u7684\u7279\u5b9a\u6570\u636e\u7c7b\u578b\uff0c\u56e0\u6b64\u5b83\u5c06\u4f7f\u7528\u4f5c\u4e3a 32 \u4f4d 4 \u5b57\u8282\u6570\u636e\u7c7b\u578b\u7684<br \/><strong>Long<\/strong> \u6570\u636e\u7c7b\u578b\u6765\u5f15\u7528\u6307\u9488\u548c\u53e5\u67c4\u3002 64 \u4f4d\u73af\u5883\u4e2d\u7684\u6307\u9488\u548c\u53e5\u67c4\u662f 8 \u5b57\u8282 64 \u4f4d\u6570\u91cf\u3002 \u8fd9\u4e9b 64 \u4f4d\u6570\u91cf\u65e0\u6cd5\u5728 32 \u4f4d\u6570\u636e\u7c7b\u578b\u4e2d\u4fdd\u7559\u3002<\/p>\n<p>\u5907\u6ce8<\/p>\n<p>\u4ec5\u5f53 VBA \u4ee3\u7801\u5728 64 \u4f4d\u7248\u672c\u7684 Microsoft Office \u4e2d\u8fd0\u884c\u9700\u8981\u4fee\u6539\u6b64\u4ee3\u7801\u3002<\/p>\n<p>\u6709\u5173\u5728 64 \u4f4d Office \u4e2d\u8fd0\u884c\u65e7 VBA \u4ee3\u7801\u7684\u95ee\u9898\u662f\uff0c\u5c1d\u8bd5\u5c06 64 \u4f4d\u52a0\u8f7d\u5230 32 \u4f4d\u6570\u636e\u7c7b\u578b\u4e2d\u4f1a\u622a\u65ad 64 \u4f4d\u6570\u91cf\u3002<br \/>\u8fd9\u4f1a\u5bfc\u81f4\u5185\u5b58\u6ea2\u51fa\u3001\u4ee3\u7801\u4e2d\u51fa\u73b0\u5f02\u5e38\u7ed3\u679c\u4ee5\u53ca\u53ef\u80fd\u7684\u5e94\u7528\u7a0b\u5e8f\u5931\u8d25\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u6b64\u95ee\u9898\u5e76\u4f7f VBA \u4ee3\u7801\u80fd\u591f\u5728 32 \u4f4d\u548c 64 \u4f4d\u73af\u5883\u4e2d\u6b63\u5e38\u5de5\u4f5c\uff0c\u5df2\u5411 VBA \u4e2d\u6dfb\u52a0\u51e0\u79cd\u8bed\u8a00\u529f\u80fd\u3002 \u6b64\u6587\u6863\u5e95\u90e8\u7684\u8868\u5bf9\u65b0\u7684 VBA<br \/>\u8bed\u8a00\u529f\u80fd\u8fdb\u884c\u4e86\u6c47\u603b\u3002 \u4e09\u4e2a\u91cd\u8981\u7684\u65b0\u589e\u529f\u80fd\u662f <strong>LongPtr<\/strong> \u7c7b\u578b\u522b\u540d\u3001 <strong>LongLong<\/strong> \u6570\u636e\u7c7b\u578b\u548c <strong>PtrSafe<\/strong> \u5173\u952e\u5b57\u3002<\/p>\n<ul>\n<li><strong><a href=\"..\/..\/reference\/user-interface-help\/longptr-data-type\">LongPtr<\/a><\/strong> \u3002 VBA \u73b0\u5728\u5305\u62ec\u53d8\u91cf\u7c7b\u578b\u522b\u540d <strong>LongPtr<\/strong> \u3002 <strong>LongPtr<\/strong> \u89e3\u6790\u4e3a\u7684\u5b9e\u9645\u6570\u636e\u7c7b\u578b\u53d6\u51b3\u4e8e\u6b63\u5728\u8fd0\u884c\u7684 Office \u7248\u672c\uff1b <strong>LongPtr<\/strong> \u5728 32 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u89e3\u6790\u4e3a <strong>Long<\/strong> \uff0c <strong>LongPtr<\/strong> \u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u89e3\u6790\u4e3a <strong>LongLong<\/strong> \u3002 \u5c06 <strong>LongPtr<\/strong> \u7528\u4e8e\u6307\u9488\u548c\u53e5\u67c4\u3002<\/li>\n<li><strong><a href=\"..\/..\/reference\/user-interface-help\/longlong-data-type\">LongLong<\/a><\/strong> \u3002 <strong>LongLong<\/strong> \u6570\u636e\u7c7b\u578b\u662f\u4ec5\u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u53ef\u7528\u7684\u5e26\u7b26\u53f7\u7684 64 \u4f4d\u6574\u6570\u3002 \u5bf9 64 \u4f4d\u6574\u6570\u4f7f\u7528 <strong>LongLong<\/strong> \u3002 \u8f6c\u6362\u51fd\u6570\u5fc5\u987b\u7528\u4e8e\u4e3a\u66f4\u5c0f\u6574\u578b\u663e\u5f0f\u5206\u914d <strong>LongLong<\/strong> \uff08\u5305\u62ec 64 \u4f4d\u5e73\u53f0\u4e0a\u7684 <strong>LongPtr<\/strong> \uff09\u3002 \u4e0d\u5141\u8bb8\u201cLongLong\u201d\u5230\u66f4\u5c0f\u7684\u6574\u6570\u7684\u9690\u5f0f\u8f6c\u6362\u3002<\/li>\n<li><strong><a href=\"..\/..\/reference\/user-interface-help\/ptrsafe-keyword\">PtrSafe<\/a><\/strong> \u3002 <strong>PtrSafe<\/strong> \u5173\u952e\u5b57\u65ad\u8a00 <strong>Declare<\/strong> \u8bed\u53e5\u53ef\u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u5b89\u5168\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<p>\u91cd\u8981<\/p>\n<p>\u73b0\u5728\uff0c\u6240\u6709 <strong>Declare<\/strong> \u8bed\u53e5\u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u8fd0\u884c\u65f6\uff0c\u90fd\u5fc5\u987b\u5305\u62ec <strong>PtrSafe<\/strong> \u5173\u952e\u5b57\u3002 \u8bf7\u52a1\u5fc5\u4e86\u89e3\uff0c\u53ea\u5c06<br \/><strong>PtrSafe<\/strong> \u5173\u952e\u5b57\u6dfb\u52a0\u5230 <strong>Declare<\/strong> \u8bed\u53e5\u53ea\u662f\u8868\u793a <strong>Declare<\/strong> \u8bed\u53e5\u663e\u5f0f\u9762\u5411 64 \u4f4d\u3002 \u8bed\u53e5\u4e2d\u9700\u8981\u5b58\u50a8 64<br \/>\u4f4d\u7684\u6240\u6709\u6570\u636e\u7c7b\u578b\uff08\u5305\u62ec\u8fd4\u56de\u503c\u548c\u53c2\u6570\uff09\u4ecd\u5fc5\u987b\u8fdb\u884c\u4fee\u6539\uff0c\u4ee5\u4fdd\u7559 64 \u4f4d\u6570\u91cf\u3002<\/p>\n<p>\u5907\u6ce8<\/p>\n<p>\u5efa\u8bae\u7684\u8bed\u6cd5\u662f\uff0c\u5c06 <strong>Declare<\/strong> \u8bed\u53e5\u4e0e <strong>PtrSafe<\/strong> \u5173\u952e\u5b57\u4e00\u8d77\u4f7f\u7528\u3002 \u5305\u62ec <strong>PtrSafe<\/strong> \u7684 <strong>Declare<\/strong><br \/>\u8bed\u53e5\u53ef\u5728 32 \u4f4d\u548c 64 \u4f4d\u5e73\u53f0\u4e0a\u7684 VBA7 \u5f00\u53d1\u73af\u5883\u4e2d\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<p>\u82e5\u8981\u786e\u4fdd\u5728 VBA7 \u53ca\u65e9\u671f\u7248\u672c\u4e2d\u5b9e\u73b0\u5411\u540e\u517c\u5bb9\u6027\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u6784\u9020\uff1a<\/p>\n<pre><code> #If VBA7 Then\n Declare PtrSafe Sub...\n #Else\n Declare Sub...\n #EndIf\n<\/code><\/pre>\n<p>\u8bf7\u8003\u8651\u4ee5\u4e0b <strong>Declare<\/strong> \u8bed\u53e5\u793a\u4f8b\u3002 \u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u8fd0\u884c\u672a\u4fee\u6539\u7684 <strong>Declare<\/strong> \u8bed\u53e5\u5c06\u5bfc\u81f4\u51fa\u73b0\u4e00\u4e2a\u9519\u8bef\uff0c\u8be5\u9519\u8bef\u6307\u793a<br \/><strong>Declare<\/strong> \u8bed\u53e5\u4e0d\u5305\u62ec <strong>PtrSafe<\/strong> \u9650\u5b9a\u7b26\u3002 \u4fee\u6539\u540e\u7684 VBA \u793a\u4f8b\u5305\u542b <strong>PtrSafe<\/strong><br \/>\u9650\u5b9a\u7b26\uff0c\u4f46\u8bf7\u6ce8\u610f\uff0c\u8fd4\u56de\u503c\uff08\u6307\u5411\u6d3b\u52a8\u7a97\u53e3\u7684\u6307\u9488\uff09\u5c06\u8fd4\u56de <strong>Long<\/strong> \u6570\u636e\u7c7b\u578b\u3002 \u5728 64 \u4f4d Office \u4e2d\uff0c\u8fd9\u662f\u4e00\u79cd\u9519\u8bef\u60c5\u51b5\uff0c\u56e0\u4e3a\u6307\u9488\u5fc5\u987b\u662f 64<br \/>\u4f4d\u3002 <strong>PtrSafe<\/strong> \u9650\u5b9a\u7b26\u544a\u77e5\u7f16\u8bd1\u5668 <strong>Declare<\/strong> \u8bed\u53e5\u9762\u5411\u7684\u662f 64 \u4f4d\uff0c\u8fd9\u6837\u8bed\u53e5\u5728\u6267\u884c\u65f6\u5c31\u4e0d\u4f1a\u51fa\u73b0\u9519\u8bef\u3002 \u4e0d\u8fc7\uff0c\u7531\u4e8e\u8fd4\u56de\u503c\u5c1a\u672a\u66f4\u65b0\u4e3a<br \/>64 \u4f4d\u6570\u636e\u7c7b\u578b\uff0c\u56e0\u6b64\uff0c\u622a\u65ad\u8fd4\u56de\u503c\u4f1a\u5bfc\u81f4\u8fd4\u56de\u4e0d\u6b63\u786e\u7684\u503c\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u672a\u4fee\u6539\u7684\u65e7\u7248 VBA <strong>Declare<\/strong> \u8bed\u53e5\u793a\u4f8b\uff1a<\/p>\n<pre><code>Declare Function GetActiveWindow Lib \"user32\" () As Long\n<\/code><\/pre>\n<p>\u4e0b\u9762\u7684 VBA <strong>Declare<\/strong> \u8bed\u53e5\u793a\u4f8b\u5df2\u4fee\u6539\u4e3a\u5305\u62ec <strong>PtrSafe<\/strong> \u9650\u5b9a\u7b26\u4f46\u4ecd\u4f7f\u7528 32 \u4f4d\u8fd4\u56de\u503c\uff1a<\/p>\n<pre><code>Declare PtrSafe Function GetActiveWindow Lib \"user32\" () As Long\n<\/code><\/pre>\n<p>\u82e5\u8981\u91cd\u505a\uff0c\u5fc5\u987b\u5c06 <strong>Declare<\/strong> \u8bed\u53e5\u4fee\u6539\u4e3a\u5305\u62ec <strong>PtrSafe<\/strong> \u9650\u5b9a\u7b26\uff0c\u5e76\u4e14\u5fc5\u987b\u66f4\u65b0\u8bed\u53e5\u4e2d\u9700\u8981\u4fdd\u7559 64<br \/>\u4f4d\u6570\u91cf\u7684\u6240\u6709\u53d8\u91cf\uff0c\u4ee5\u4f7f\u8fd9\u4e9b\u53d8\u91cf\u4f7f\u7528 64 \u4f4d\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a VBA <strong>Declare<\/strong> \u8bed\u53e5\u793a\u4f8b\uff0c\u5b83\u5df2\u4fee\u6539\u4e3a\u5305\u62ec <strong>PtrSafe<\/strong> \u5173\u952e\u5b57\uff0c\u5e76\u5df2\u66f4\u65b0\u4e3a\u4f7f\u7528\u9002\u5f53\u7684 64 \u4f4d (<br \/><strong>LongPtr<\/strong> ) \u6570\u636e\u7c7b\u578b\uff1a<\/p>\n<pre><code>Declare PtrSafe Function GetActiveWindow Lib \"user32\" () As LongPtr\n<\/code><\/pre>\n<p>\u603b\u4e4b\uff0c\u4e3a\u4e86\u8ba9\u4ee3\u7801\u5728 64 \u4f4d\u7248\u672c\u7684 Office \u4e2d\u8fd0\u884c\uff0c\u60a8\u9700\u8981\u627e\u5230\u6240\u6709\u73b0\u6709 <strong>Declare<\/strong> \u8bed\u53e5\u5e76\u5c06\u5176\u4fee\u6539\u4e3a\u4f7f\u7528 <strong>PtrSafe<\/strong> \u9650\u5b9a\u7b26\u3002<br \/>\u8fd8\u9700\u8981\u627e\u5230\u5e76\u4fee\u6539\u8fd9\u4e9b <strong>Declare<\/strong> \u8bed\u53e5\u4e2d\u6240\u6709\u5f15\u7528\u53e5\u67c4\u6216\u6307\u9488\u7684\u6570\u636e\u7c7b\u578b\u4ee5\u4f7f\u7528\u65b0\u7684 64 \u4f4d\u517c\u5bb9\u7684 <strong>LongPtr<\/strong> \u7c7b\u578b\u522b\u540d\uff0c\u4ee5\u53ca\u9700\u8981\u4fdd\u7559<br \/>64 \u4f4d\u6574\u578b\u548c\u65b0\u7684 <strong>LongLong<\/strong> \u6570\u636e\u7c7b\u578b\u7684\u7c7b\u578b\u3002 \u6b64\u5916\uff0c\u5fc5\u987b\u66f4\u65b0\u5305\u542b\u6307\u9488\u6216\u53e5\u67c4\u7684\u6240\u6709\u7528\u6237\u5b9a\u4e49\u7c7b\u578b (UDT) \u548c 64 \u4f4d\u6574\u578b\uff0c\u4ee5\u4f7f\u7528 64<br \/>\u4f4d\u6570\u636e\u7c7b\u578b\uff0c\u5e76\u786e\u8ba4\u6240\u6709\u53d8\u91cf\u8d4b\u503c\u662f\u6b63\u786e\u7684\uff0c\u4ee5\u963b\u6b62\u51fa\u73b0\u7c7b\u578b\u4e0d\u5339\u914d\u9519\u8bef\u3002<\/p>\n<h2>\u7f16\u5199\u9002\u7528\u4e8e 32 \u4f4d\u548c 64 \u4f4d Office \u7684\u4ee3\u7801<\/h2>\n<p>\u82e5\u8981\u7f16\u5199\u53ef\u5728 32 \u4f4d\u7248\u672c\u548c 64 \u4f4d\u7248\u672c\u7684 Office \u4e4b\u95f4\u79fb\u690d\u7684\u4ee3\u7801\uff0c\u53ea\u9700\u5bf9\u6240\u6709\u6307\u9488\u548c\u53e5\u67c4\u503c\u4f7f\u7528\u65b0\u7684 <strong>LongPtr<\/strong> \u7c7b\u578b\u522b\u540d\u5373\u53ef\uff0c\u800c\u4e0d\u662f<br \/><strong>Long<\/strong> \u6216 <strong>LongLong<\/strong> \u3002 <strong>LongPtr<\/strong> \u7c7b\u578b\u522b\u540d\u5c06\u88ab\u89e3\u6790\u4e3a\u6b63\u786e\u7684 <strong>Long<\/strong> \u6216 <strong>LongLong<\/strong><br \/>\u6570\u636e\u7c7b\u578b\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u8fd0\u884c\u7684\u662f\u54ea\u4e2a Office \u7248\u672c\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u9700\u8981\u6267\u884c\u4e0d\u540c\u7684\u903b\u8f91\uff08\u4f8b\u5982\uff0c\u9700\u8981\u5728\u5927\u578b Excel \u9879\u76ee\u4e2d\u64cd\u4f5c 64 \u4f4d\u503c\uff09\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528 <strong>Win64<\/strong> \u6761\u4ef6\u7f16\u8bd1\u5e38\u91cf\uff0c\u5982\u4ee5\u4e0b\u90e8\u5206\u6240\u793a\u3002<\/p>\n<h2>\u7f16\u5199\u5728 Office 2010\uff0832 \u4f4d\u6216 64 \u4f4d\uff09\u548c\u65e9\u671f\u7248\u672c\u7684 Office \u4e0a\u8fd0\u884c\u7684\u4ee3\u7801<\/h2>\n<p>\u82e5\u8981\u7f16\u5199\u53ef\u540c\u65f6\u5728\u65b0\u7248\u672c\u548c\u65e7\u7248\u672c\u7684 Office \u4e2d\u8fd0\u884c\u7684\u4ee3\u7801\uff0c\u53ef\u4ee5\u5c06\u65b0\u7684 <strong>VBA7<\/strong> \u548c <strong>Win64<\/strong> \u6761\u4ef6 [\u7f16\u8bd1\u5668\u5e38\u91cf](compiler-<br \/>constants)\u7ec4\u5408\u4f7f\u7528\u3002 <strong>Vba7<\/strong> \u6761\u4ef6\u7f16\u8bd1\u5668\u5e38\u91cf\u7528\u4e8e\u786e\u5b9a\u4ee3\u7801\u662f\u5426\u5728\u7248\u672c 7 \u7684 VB \u7f16\u8f91\u5668\uff08Office 2010 \u968f\u9644\u7684 VBA<br \/>\u7248\u672c\uff09\u4e2d\u8fd0\u884c\u3002 <strong>Win64<\/strong> \u6761\u4ef6\u7f16\u8bd1\u5668\u5e38\u91cf\u7528\u4e8e\u786e\u5b9a\u6b63\u5728\u8fd0\u884c\u54ea\u4e2a\u7248\u672c\u7684 Office\uff0832 \u4f4d\u6216 64 \u4f4d\uff09\u3002<\/p>\n<pre><code>#if Vba7 then\n'  Code is running in the new VBA7 editor\n     #if Win64 then\n     '  Code is running in 64-bit version of Microsoft Office\n     #else\n     '  Code is running in 32-bit version of Microsoft Office\n     #end if\n#else\n' Code is running in VBA version 6 or earlier\n#end if\n\n#If Vba7 Then\nDeclare PtrSafe Sub...\n#Else\nDeclare Sub...\n#EndIf\n<\/code><\/pre>\n<h2>VBA7 \u8bed\u8a00\u66f4\u65b0\u6458\u8981<\/h2>\n<p>\u4e0b\u8868\u6c47\u603b\u4e86\u65b0 VBA \u8bed\u8a00\u589e\u6dfb\u529f\u80fd\uff0c\u5e76\u63d0\u4f9b\u4e86\u6bcf\u9879\u589e\u6dfb\u529f\u80fd\u7684\u8bf4\u660e\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u540d\u79f0<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>PtrSafe<\/strong><\/td>\n<td>\u5173\u952e\u5b57<\/td>\n<td>\u65ad\u8a00 <strong>Declare<\/strong> \u8bed\u53e5\u662f\u9762\u5411 64 \u4f4d\u7cfb\u7edf\u7684\u3002 \u5728 64 \u4f4d\u7cfb\u7edf\u4e0a\u662f\u5fc5\u9700\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>LongPtr<\/strong><\/td>\n<td>\u6570\u636e\u7c7b\u578b<\/td>\n<td>\u6620\u5c04\u5230 32 \u4f4d\u7cfb\u7edf\u4e0a\u7684 <strong>Long<\/strong> \u6216 64 \u4f4d\u7cfb\u7edf\u4e0a\u7684 <strong>LongLong<\/strong> \u7684\u7c7b\u578b\u522b\u540d\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>LongLong<\/strong><\/td>\n<td>\u6570\u636e\u7c7b\u578b<\/td>\n<td>\u4ec5\u9002\u7528\u4e8e 64 \u4f4d\u7cfb\u7edf\u7684 8 \u5b57\u8282\u6570\u5b57\u7c7b\u578b\u3002 \u6570\u5b57\u7c7b\u578b\u3002 \u6574\u6570\u8303\u56f4\u4e3a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>-9,223,372,036,854,775,808 \u81f3 9,223,372,036,854,775,807\u3002  <\/p>\n<p><strong>LongLong<\/strong> \u4ec5\u5728 64 \u4f4d\u5e73\u53f0\u4e0a\u662f\u6709\u6548\u58f0\u660e\u7c7b\u578b\u3002 \u6b64\u5916\uff0c <strong>LongLong<\/strong> \u4e0d\u80fd\u88ab\u9690\u5f0f\u8f6c\u6362\u4e3a\u8f83\u5c0f\u7684\u7c7b\u578b\uff08\u4f8b\u5982\uff0c\u4e0d\u80fd\u5c06<br \/><strong>LongLong<\/strong> \u5206\u914d\u7ed9 <strong>Long<\/strong> \uff09\u3002 \u8fd9\u662f\u4e3a\u4e86\u9632\u6b62\u610f\u5916\u7684\u6307\u9488\u622a\u65ad\u3002  <\/p>\n<p>\u5141\u8bb8\u663e\u5f0f\u5f3a\u5236\uff0c\u56e0\u6b64\uff0c\u5728\u4e0a\u4e00\u793a\u4f8b\u4e2d\uff0c\u53ef\u4ee5\u5c06 <strong>CLng<\/strong> \u5e94\u7528\u4e8e <strong>LongLong<\/strong> \u5e76\u5c06\u7ed3\u679c\u5206\u914d\u7ed9 <strong>Long<\/strong> \uff08\u4ec5\u5728 64<br \/>\u4f4d\u5e73\u53f0\u4e0a\u6709\u6548\uff09\u3002  <br \/><strong>^<\/strong> | <strong>LongLong<\/strong> \u7c7b\u578b\u58f0\u660e\u5b57\u7b26 | \u5c06\u6587\u5b57\u503c\u663e\u5f0f\u58f0\u660e\u4e3a <strong>LongLong<\/strong> \u3002 \u5b83\u662f\u58f0\u660e\u5927\u4e8e\u6700\u5927 <strong>Long<\/strong> \u503c\u7684<br \/><strong>LongLong<\/strong> \u6587\u672c\u6240\u5fc5\u9700\u7684\uff08\u5426\u5219\uff0c\u5b83\u5c06\u9690\u5f0f\u8f6c\u6362\u4e3a <strong>double<\/strong> \uff09\u3002  <br \/><strong><a href=\"type-conversion-functions\">CLngPtr<\/a><\/strong> | \u7c7b\u578b\u8f6c\u6362\u51fd\u6570 | \u5c06\u7b80\u5355\u8868\u8fbe\u5f0f\u8f6c\u6362\u4e3a <strong>LongPtr<\/strong> \u3002  <br \/><strong><a href=\"type-conversion-functions\">CLngLng<\/a><\/strong> | \u7c7b\u578b\u8f6c\u6362\u51fd\u6570 | \u5c06\u7b80\u5355\u8868\u8fbe\u5f0f\u8f6c\u6362\u4e3a <strong>LongLong<\/strong><br \/>\u6570\u636e\u7c7b\u578b\uff08\u4ec5\u5728 64 \u4f4d\u5e73\u53f0\u4e0a\u6709\u6548\uff09\u3002  <br \/><strong><a href=\"vartype-constants\">vbLongLong<\/a><\/strong> | VarType \u5e38\u91cf | <strong>LongLong<\/strong> \u6574\u6570\uff08\u4ec5\u5728 64<br \/>\u4f4d\u5e73\u53f0\u4e0a\u6709\u6548\uff09\u3002  <br \/><strong><a href=\"deftype-statements\">DefLngPtr<\/a><\/strong> | DefType \u8bed\u53e5 | \u5c06\u4e00\u7cfb\u5217\u53d8\u91cf\u7684\u9ed8\u8ba4\u6570\u636e\u7c7b\u578b\u8bbe\u7f6e\u4e3a<br \/><strong>LongPtr<\/strong> \u3002  <br \/><strong><a href=\"deftype-statements\">DefLngLng<\/a><\/strong> | DefType \u8bed\u53e5 | \u5c06\u4e00\u7cfb\u5217\u53d8\u91cf\u7684\u9ed8\u8ba4\u6570\u636e\u7c7b\u578b\u8bbe\u7f6e\u4e3a<br \/><strong>LongLong<\/strong> \u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5fae\u8f6f\u4e2d\u6587\u6587\u6863 64 \u4f4d Visual Basic for Applications \u6982\u8ff0 \u672c\u6587\u5185\u5bb9  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[67],"class_list":["post-1168","post","type-post","status-publish","format-standard","hentry","category-learn","tag-vba"],"_links":{"self":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/comments?post=1168"}],"version-history":[{"count":0,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/posts\/1168\/revisions"}],"wp:attachment":[{"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/media?parent=1168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/categories?post=1168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lyvba.com\/index.php\/wp-json\/wp\/v2\/tags?post=1168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}