{"id":2881,"date":"2019-11-20T02:09:06","date_gmt":"2019-11-19T17:09:06","guid":{"rendered":"https:\/\/okamurax.com\/?p=2881"},"modified":"2020-01-16T09:06:15","modified_gmt":"2020-01-16T00:06:15","slug":"vba-%e3%83%95%e3%82%a9%e3%83%ab%e3%83%80%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=2881","title":{"rendered":"VBA \u30d5\u30a9\u30eb\u30c0\u4f5c\u6210"},"content":{"rendered":"<p>\u4ee5\u524d\u30d5\u30a9\u30eb\u30c0\u306e\u69cb\u6210\u3092\u30a8\u30af\u30bb\u30eb\u306b\u66f8\u304d\u51fa\u3059\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"nxlUlyiZo4\"><p><a href=\"https:\/\/appbay.org\/?p=32\">VBA \u30d5\u30a9\u30eb\u30c0\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u306e\u4e00\u89a7<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;VBA \u30d5\u30a9\u30eb\u30c0\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u306e\u4e00\u89a7&#8221; &#8212; \u30c6\u30c3\u30af\u30e1\u30e2\" src=\"https:\/\/appbay.org\/?p=32&#038;embed=true#?secret=LkPQveU86f#?secret=nxlUlyiZo4\" data-secret=\"nxlUlyiZo4\" width=\"525\" height=\"296\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u9006\u306b\u30a8\u30af\u30bb\u30eb\u304b\u3089\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u308b\u3068\u4fbf\u5229\u3068\u3044\u3046\u5834\u9762\u3082\u591a\u3044\u306e\u3067\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n<pre class=\"lang:vb decode:true \">Sub CreateFolder()\r\n\r\nSet w = Sheets(\"\u8868\u7d19\")\r\n\r\nbasePath = Application.ActiveWorkbook.Path\r\n\r\nr = 1\r\nDo While w.Cells(r, 1).Value &lt;&gt; \"\"\r\n\r\n  targetPath = basePath &amp; \"\\\" &amp; w.Cells(r, 1).Value\r\n  \r\n  If \"\" &lt;&gt; Dir(targetPath, vbDirectory) Then\r\n    MsgBox w.Cells(r, 1).Value &amp; \"\u306f\u65e2\u306b\u5b58\u5728\u3057\u307e\u3059\u3002\"\r\n    Exit Sub\r\n  End If\r\n\r\nr = r + 1\r\nLoop\r\n\r\nr = 1\r\nDo While w.Cells(r, 1).Value &lt;&gt; \"\"\r\n\r\n  targetPath = basePath &amp; \"\\\" &amp; w.Cells(r, 1).Value\r\n  If \"\" = Dir(targetPath, vbDirectory) Then MkDir (targetPath) ' \u6307\u5b9a\u304c\u91cd\u8907\u3057\u3066\u305f\u5834\u5408\r\n  \r\nr = r + 1\r\nLoop\r\n\r\nMsgBox \"\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\"\r\n\r\nEnd Sub<\/pre>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/7oWjv0UEftc\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u30d5\u30a9\u30eb\u30c0\u306e\u69cb\u6210\u3092\u30a8\u30af\u30bb\u30eb\u306b\u66f8\u304d\u51fa\u3059\u6a5f\u80fd\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 VBA \u30d5\u30a9\u30eb\u30c0\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u306e\u4e00\u89a7 \u9006\u306b\u30a8\u30af\u30bb\u30eb\u304b\u3089\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3067\u304d\u308b\u3068\u4fbf\u5229\u3068\u3044\u3046\u5834\u9762\u3082\u591a\u3044\u306e\u3067\u4f5c\u3063\u3066\u307f\u305f\u3002 Sub CreateFolder() Set &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=2881\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VBA \u30d5\u30a9\u30eb\u30c0\u4f5c\u6210&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5],"class_list":["post-2881","post","type-post","status-publish","format-standard","hentry","category-1","tag-vba"],"_links":{"self":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2881"}],"version-history":[{"count":4,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2881\/revisions"}],"predecessor-version":[{"id":3034,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/2881\/revisions\/3034"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}