{"id":3079,"date":"2022-06-13T11:37:52","date_gmt":"2022-06-13T02:37:52","guid":{"rendered":"http:\/\/anada.cloudfree.jp\/?p=3079"},"modified":"2022-06-13T11:43:51","modified_gmt":"2022-06-13T02:43:51","slug":"accessvba%e8%a6%9a%e6%9b%b8-%e9%83%b5%e4%be%bf%e7%95%aa%e5%8f%b7%e3%81%8b%e3%82%89%e4%bd%8f%e6%89%80%e3%82%92%e5%87%ba%e3%81%99msyubin7-dll","status":"publish","type":"post","link":"http:\/\/anada.cloudfree.jp\/?p=3079","title":{"rendered":"AccessVBA\u899a\u66f8 \u90f5\u4fbf\u756a\u53f7\u304b\u3089\u4f4f\u6240\u3092\u51fa\u3059(MsYubin7.dll)"},"content":{"rendered":"<p>Access\u3067\u4f4f\u6240\u652f\u63f4\u5165\u529b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u304c\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u8a2d\u5b9a\u305b\u305a\u306b\u30ed\u30b8\u30c3\u30af\u3067\u884c\u3046\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u3088\u3044\u304b\u3068\u3044\u3046\u554f\u984c\u3078\u306e\u5bfe\u5fdc\u7b56\u3002<br \/>\n\u4f7f\u3046\u306e\u306f\u4f4f\u6240\u652f\u63f4\u5165\u529b\u3067\u4f7f\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u540c\u3058\u3082\u306e(\u3060\u3068\u306f\u601d\u3046)\u3002MsYubin7.dll\u3002<\/p>\n<p>\uff13\u3064\u306e\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9PrefText\u3001CityText\u3001TownText\u306b\u3001\u90fd\u9053\u5e9c\u770c\u3001\u5e02\u533a\u753a\u6751\u3001\u753a\u57df\u3092\u305d\u308c\u305e\u308c\u8a2d\u5b9a\u3059\u308b\u524d\u63d0\u3067\u3002<\/p>\n<p>\u307e\u305a\u547c\u51fa\u5143\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nDim res() As String\r\nConvZip2arrAddr(&quot;1600005&quot;,res)\r\nPrefText = res(0)\r\nCityText = res(1)\r\nTownText = res(2)\r\n<\/pre>\n<p>\u307e\u305a\u547c\u51fa\u5148\u3002\u3053\u308c\u306f\u5225\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u3066\u8a18\u8f09\u3057\u3066\u304a\u3051\u3070\u3044\u3044\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nPrivate Declare PtrSafe Function zcGetZipDecision Lib &quot;MSYubin7.dll&quot; Alias &quot;GetZipDecision&quot; _\r\n                                                                            (ByVal ZipCode As String, _\r\n                                                                            ByVal szKen As String, _\r\n                                                                            ByVal szCty1 As String, _\r\n                                                                            ByVal szCty2 As String, _\r\n                                                                            ByVal szTwn As String, _\r\n                                                                            ByVal szTwnExt As String) As Long\r\n\r\nPublic Sub ConvZip2arrAddr(ByRef zipCd As String, arrAddr() As String)\r\n    \r\n    Dim pref    As String * 40\r\n    Dim city1   As String * 40\r\n    Dim city2   As String * 40\r\n    Dim town1   As String * 40\r\n    Dim town2   As String * 500\r\n    Dim arrRet(4)    As String\r\n    \r\n    On Error GoTo ErrFunc\r\n    \r\n    If zipCd = vbNullString Then Exit Sub\r\n    If Len(zipCd) &lt;&gt; 7 Then Exit Sub\r\n\r\n    If Val(zipCd) Then\r\n        zcGetZipDecision zipCd, pref, city1, city2, town1, town2\r\n        arrRet(0) = Left$(pref, InStr(pref, vbNullChar) - 1)\r\n        arrRet(1) = Left$(city1, InStr(city1, vbNullChar) - 1)\r\n        arrRet(2) = Left$(city2, InStr(city2, vbNullChar) - 1)\r\n        arrRet(3) = Left$(town1, InStr(town1, vbNullChar) - 1)\r\n        arrRet(4) = Left$(town2, InStr(town2, vbNullChar) - 1)\r\n        ReDim arrAddr(0 To 2)\r\n        arrAddr(0) = arrRet(0)\r\n        arrAddr(1) = arrRet(1) &amp; arrRet(2)\r\n        arrAddr(2) = arrRet(3) &amp; arrRet(4)\r\n    End If\r\n    Exit Sub\r\n    \r\nErrFunc:\r\n    Debug.Print &quot;No.&quot; &amp; Err.Number &amp; &quot;:&quot; &amp; Err.Description\r\nEnd Sub\r\n<\/pre>\n<p>Access2019\u3067\u8a66\u3057\u305f\u304c\u3001\u4ed6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3082\u305d\u308c\u307b\u3069\u9055\u3044\u306f\u306a\u3044\u3068\u601d\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Access\u3067\u4f4f\u6240\u652f\u63f4\u5165\u529b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u304c\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u8a2d\u5b9a\u305b\u305a\u306b\u30ed\u30b8\u30c3\u30af\u3067\u884c\u3046\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u3088\u3044\u304b\u3068\u3044\u3046\u554f\u984c\u3078\u306e\u5bfe\u5fdc\u7b56\u3002 \u4f7f\u3046\u306e\u306f\u4f4f\u6240\u652f\u63f4\u5165\u529b\u3067\u4f7f\u3063\u3066\u3044\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u540c\u3058\u3082\u306e(\u3060\u3068\u306f\u601d\u3046)\u3002MsYubin7.dll\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[178,221,74,222],"class_list":["post-3079","post","type-post","status-publish","format-standard","hentry","category-excelvba","tag-access","tag-msyubin7","tag-vba","tag-222"],"_links":{"self":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/3079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3079"}],"version-history":[{"count":4,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/3079\/revisions"}],"predecessor-version":[{"id":3085,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/3079\/revisions\/3085"}],"wp:attachment":[{"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3079"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/anada.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}