{"id":3779,"date":"2013-11-22T15:10:31","date_gmt":"2013-11-22T06:10:31","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=3779"},"modified":"2022-01-20T08:57:39","modified_gmt":"2022-01-19T23:57:39","slug":"64%e3%83%93%e3%83%83%e3%83%88%e7%92%b0%e5%a2%83%e3%81%8b%e3%81%a9%e3%81%86%e3%81%8b%e3%82%92%e5%88%a4%e5%88%a5%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=3779","title":{"rendered":"64\u30d3\u30c3\u30c8\u74b0\u5883\u304b\u3069\u3046\u304b\u3092\u5224\u5225\u3059\u308bVBA\u30de\u30af\u30ed"},"content":{"rendered":"<p>2\u5e74\u4ee5\u4e0a\u524d\u306bMicrosoft Community(\u5f53\u6642\u306fMicrosoft Answers)\u3067\u56de\u7b54\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p><strong>\u30fbExcel\u3067Win7_32bitOS\u304b64bitOS\u3092\u5224\u65ad<\/strong><br \/>\n<a href=\"http:\/\/answers.microsoft.com\/thread\/951ca707-4eb1-4751-8050-a2968e3cd788\" title=\"Excel\u3067Win7_32bitOS\u304b64bitOS\u3092\u5224\u65ad - \u30de\u30a4\u30af\u30ed\u30bd\u30d5\u30c8 \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\" target=\"_blank\" rel=\"noopener\">http:\/\/answers.microsoft.com\/thread\/951ca707-4eb1-4751-8050-a2968e3cd788<\/a><\/p>\n<p>\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u8a18\u4e8b\u3068\u3057\u3066\u6b8b\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample1()\r\n  Dim colItems As Object\r\n  Dim itm As Object\r\n \r\n  Set colItems = CreateObject(&quot;WbemScripting.SWbemLocator&quot;).ConnectServer.ExecQuery(&quot;Select * From Win32_OperatingSystem&quot;)\r\n  For Each itm In colItems\r\n    Debug.Print itm.OSArchitecture\r\n    Exit For\r\n  Next\r\nEnd Sub<\/pre>\n<p><strong>\u30fb\u7d50\u679c1\uff1a<\/strong><\/p>\n<ol>\n<li>Windows 7(x64) + Office 2010(x86)\uff1a64 \u30d3\u30c3\u30c8<\/li>\n<li>Windows Server 2008 R2(x64) + Office 2010(x64)\uff1a64 \u30d3\u30c3\u30c8<\/li>\n<\/ol>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample2()\r\n  Debug.Print Application.OperatingSystem\r\nEnd Sub<\/pre>\n<p><strong>\u30fb\u7d50\u679c2\uff1a<\/strong><\/p>\n<ol>\n<li>Windows 7(x64) + Office 2010(x86)\uff1aWindows (32-bit) NT 6.01<\/li>\n<li>Windows Server 2008 R2(x64) + Office 2010(x64)\uff1aWindows (64-bit) NT 6.01<\/li>\n<\/ol>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample3()\r\n  Debug.Print CreateObject(&quot;WScript.Shell&quot;).ExpandEnvironmentStrings(&quot;%PROCESSOR_ARCHITECTURE%&quot;)\r\nEnd Sub<\/pre>\n<p><strong>\u30fb\u7d50\u679c3\uff1a<\/strong><\/p>\n<ol>\n<li>Windows 7(x64) + Office 2010(x86)\uff1ax86<\/li>\n<li>Windows Server 2008 R2(x64) + Office 2010(x64)\uff1aAMD64<\/li>\n<\/ol>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample4()\r\n  Debug.Print CreateObject(&quot;htmlfile&quot;).parentWindow.clientInformation.cpuClass\r\nEnd Sub<\/pre>\n<p><strong>\u30fb\u7d50\u679c4\uff1a<\/strong><\/p>\n<ol>\n<li>Windows 7(x64) + Office 2010(x86)\uff1ax86<\/li>\n<li>Windows Server 2008 R2(x64) + Office 2010(x64)\uff1ax64<\/li>\n<\/ol>\n<p>\u4e0a\u8a18\u306e\u7d50\u679c\u304b\u3089\u3001WOW64\u74b0\u5883\u4e0b\u3067\u306f\u6b63\u3057\u304f\u5224\u5225\u3067\u304d\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001OS\u304c64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306f<strong>Sample1<\/strong>\u306e\u3088\u3046\u306bWMI\u3092\u4f7f\u3046\u306e\u304c\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n<p><script src=\"https:\/\/gist.github.com\/kinuasa\/297595d1cee0142d0e58e13c798035c1.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"2\u5e74\u4ee5\u4e0a\u524d\u306bMicrosoft Community(\u5f53\u6642\u306fMicrosoft Answers)\u3067\u56de\u7b54\u3057\u305f\u3068\u304d\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002 \u30fbExcel\u3067Win7_32bitOS\u304b64bitOS\u3092\u5224\u65ad http:\/\/answers.mi [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48],"tags":[],"class_list":["post-3779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-YX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3779"}],"version-history":[{"count":4,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3779\/revisions"}],"predecessor-version":[{"id":14355,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3779\/revisions\/14355"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}