{"id":4402,"date":"2021-06-23T01:26:25","date_gmt":"2021-06-22T16:26:25","guid":{"rendered":"https:\/\/okamurax.com\/?p=4402"},"modified":"2022-08-26T14:59:08","modified_gmt":"2022-08-26T05:59:08","slug":"vba-%e5%85%a5%e5%8a%9b%e8%a6%8f%e5%89%87","status":"publish","type":"post","link":"https:\/\/appbay.org\/?p=4402","title":{"rendered":"VBA \u5165\u529b\u898f\u5247"},"content":{"rendered":"<pre class=\"lang:vb decode:true \">Sub test()\r\n\r\nFor Each w In Sheets\r\n  w.Cells.Validation.Delete\r\nNext\r\n    \r\nEnd Sub<\/pre>\n<pre class=\"lang:vb decode:true\">Sub test()\r\n\r\nFor Each w In Sheets\r\n\r\n  If w.Name = \"Sheet2\" Then GoTo continue\r\n  \r\n  With w.Range(\"A2:A10\").Validation\r\n    .Delete\r\n    .Add Type:=xlValidateList, Operator:=xlEqual, Formula1:=\"\u30c6\u30b9\u30c81,\u30c6\u30b9\u30c82\"\r\n  End With\r\n\r\ncontinue:\r\nNext\r\n    \r\nEnd Sub\r\n<\/pre>\n<pre class=\"lang:vb decode:true \">Sub test()\r\n\r\nSet w = ActiveSheet\r\n\r\nw.Range(\"A2:K1000\").Clear\r\n\r\nWith w.Range(\"A2:A1000\").Validation\r\n  .Delete\r\n  .Add Type:=xlValidateList, Operator:=xlEqual, Formula1:=\"=\u30de\u30b9\u30bf!$A$1:$A$776\"\r\nEnd With\r\n\r\nEnd Sub<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sub test() For Each w In Sheets w.Cells.Validation.Delete Next End Sub Sub test() For Each w In Sheets If w.Na &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/appbay.org\/?p=4402\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VBA \u5165\u529b\u898f\u5247&#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-4402","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\/4402","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=4402"}],"version-history":[{"count":3,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/4402\/revisions"}],"predecessor-version":[{"id":5304,"href":"https:\/\/appbay.org\/index.php?rest_route=\/wp\/v2\/posts\/4402\/revisions\/5304"}],"wp:attachment":[{"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appbay.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}