{"id":324,"date":"2016-08-26T02:39:10","date_gmt":"2016-08-26T02:39:10","guid":{"rendered":"http:\/\/mio-web.net\/pcsupport\/?p=324"},"modified":"2016-10-13T01:36:17","modified_gmt":"2016-10-13T01:36:17","slug":"access-%e8%87%aa%e5%8b%95%e7%9a%84%e3%81%ab%e5%8f%82%e7%85%a7%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8bvba","status":"publish","type":"post","link":"https:\/\/mio-web.net\/pcsupport\/archives\/324\/","title":{"rendered":"ACCESS \u81ea\u52d5\u7684\u306b\u53c2\u7167\u8a2d\u5b9a\u3059\u308bVBA"},"content":{"rendered":"<p>On Error Goto Err_Shori<br \/>\nDim Ref As Reference<br \/>\nConst strExcel As String = &#8220;{00020813-0000-0000-C000-000000000046}&#8221;<br \/>\nSet Ref = References.AddFromGuid ( strExcel , 1, 3 )<br \/>\nSet Ref = Nothing<br \/>\nexit sub \u2192\u3000\u3053\u306e1\u884c\u3092\u629c\u304f\u3068\u7a7a\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u308b<\/p>\n<p>Err_Shori:<br \/>\nIf Err.Number = 32813 Then<br \/>\nResume Next<br \/>\nElse<br \/>\nMsgbox Err.Description<br \/>\nEnd If<\/p>\n<p>\u3053\u308c\u306fExcel\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u53c2\u7167\u3059\u308bVBA\u3067\u3059\u3002<\/p>\n<p>1\u884c\u76ee\u306f\u30a8\u30e9\u30fc\u51e6\u7406\u3067\u3001Err_Shori\u4ee5\u964d\u306b\u98db\u3070\u3057\u307e\u3059\u3002<br \/>\n<strong>\u53c2\u7167\u8a2d\u5b9a\u304c\u65e2\u306b\u3055\u308c\u3066\u3044\u308b\u3068\u304d\u306f\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u305d\u306e\u5834\u5408\u306b\u306f\u56de\u907f\u3055\u305b\u307e\u3059\u3002<\/strong><\/p>\n<p>strExcel\u306b\u4ee3\u5165\u3057\u305f\u3001\u300c00020813-0000-0000-C000-000000000046\u300d\u306f\u3001GUID\u3068\u3044\u3046\u3082\u306e\u3067\u3001\u3053\u306e\u5024\u304cExcel\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&#8216;\u81ea\u52d5\u7684\u306b\u53c2\u7167\u3092\u89e3\u9664\u3059\u308bVBA<\/p>\n<p>Dim Ref As Reference<br \/>\nFor Each Ref In References<br \/>\nIf Ref.Name = &#8220;Excel&#8221; Then<br \/>\nApplication.References.Remove Ref<br \/>\nEnd If<br \/>\nNext Ref<\/p>\n<p>\u53c2\u8003\uff35\uff32\uff2c<br \/>\nhttp:\/\/www.iltt.info\/page\/information\/contents\/20100113.htm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Error Goto Err_Shori Dim Ref As Reference Const strExcel As String = &#8220;{00020813-0000-0000-C000-000000 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[24],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-access"],"_links":{"self":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":3,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":338,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/324\/revisions\/338"}],"wp:attachment":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}