{"id":3774,"date":"2015-09-27T09:29:16","date_gmt":"2015-09-27T00:29:16","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3774"},"modified":"2015-10-22T15:58:58","modified_gmt":"2015-10-22T06:58:58","slug":"sheetadddelete","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/sheetadddelete\/","title":{"rendered":"\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u306e\u8ffd\u52a0\u30fb\u524a\u9664\uff08Add \u30e1\u30bd\u30c3\u30c9\u30fbDelete \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>\u65b0\u3057\u3044\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u4f5c\u6210<\/h2>\n<div class=\"m30-l\">\n<p><strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong>\u3067\u3001\u65b0\u3057\u3044\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u305f\u5834\u6240\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Add<\/strong> ( [ <em>before<\/em>, <em>after<\/em>, <em>count<\/em>, <em>type<\/em> ] )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Sheets \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u3001<span class=\"red\"><strong>Worksheets \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u3001<span class=\"red\"><strong>Charts \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>before&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u3053\u3053\u3067\u6307\u5b9a\u3057\u305f\u30b7\u30fc\u30c8\u306e\u76f4\u524d\u306b\u3001\u65b0\u898f\u306e\u30b7\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff08\u7701\u7565\u53ef\uff09\u3002<\/li>\n<li>after&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u3053\u3053\u3067\u6307\u5b9a\u3057\u305f\u30b7\u30fc\u30c8\u306e\u76f4\u5f8c\u306b\u3001\u65b0\u898f\u306e\u30b7\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff08\u7701\u7565\u53ef\uff09\u3002<\/li>\n<li>count&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8ffd\u52a0\u3059\u308b\u30b7\u30fc\u30c8\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\uff08\u7701\u7565\u53ef\uff09\u3002<\/li>\n<li>type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8ffd\u52a0\u3059\u308b\u30b7\u30fc\u30c8\u306e\u7a2e\u985e\u3092 <strong>XlSheetType \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u307e\u305f\u306f\u305d\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<em>object<\/em> \u306b\u3088\u308a\u8ffd\u52a0\u3067\u304d\u308b\u30b7\u30fc\u30c8\u306e\u7a2e\u985e\u306b\u9055\u3044\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u7701\u7565\u53ef\uff09\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"250\" bgcolor=\"#ffffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"80\" bgcolor=\"#ffffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"320\" bgcolor=\"#ffffccc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlWorksheet<\/td>\n<td width=\"80\" align = \"center\">-4167<\/td>\n<td width=\"320\">\u30ef\u30fc\u30af\u30b7\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlExcel4MacroSheet<\/td>\n<td width=\"80\" align = \"center\">3<\/td>\n<td width=\"320\">Excel 4 \u30de\u30af\u30ed \u30b7\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlExcel4IntlMacroSheet<\/td>\n<td width=\"80\" align = \"center\">4<\/td>\n<td width=\"320\">Excel 4 \u30a4\u30f3\u30bf\u30fc\u30ca\u30b7\u30e7\u30ca\u30eb\u30de\u30af\u30ed\u30b7\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlDialogSheet<\/td>\n<td width=\"80\" align = \"center\">-4116<\/td>\n<td width=\"320\">\u30c0\u30a4\u30a2\u30ed\u30b0 \u30b7\u30fc\u30c8<\/td>\n<\/tr>\n<tr>\n<td width=\"250\">xlChart<\/td>\n<td width=\"80\" align = \"center\">-4109<\/td>\n<td width=\"320\">\u30b0\u30e9\u30d5<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u306e\u8ffd\u52a0\u3068\u540d\u524d\u306e\u8a2d\u5b9a<\/h2>\n<div class=\"m30-l\">\n<p>\u65b0\u898f\u306b\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u3001\u540d\u524d\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u3092\u4f7f\u7528\u3057\u3066\u3001\u65b0\u898f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u633f\u5165\u5f8c\u3001<strong>Name \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\uff08\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/booksheetname\/\">\u30d6\u30c3\u30af\u30fb\u30b7\u30fc\u30c8\u306e\u540d\u524d\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\uff08Name \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/a> \u3092\u53c2\u7167\uff09\u3067\u540d\u524d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u304c\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u66f8\u5f0f\u3092\u4f7f\u3063\u3066\u3001\uff11\u884c\u3067\u66f8\u304f\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Add<\/strong>( [ <em>before<\/em>, <em>after<\/em>, <em>count<\/em>, <em>type<\/em> ] ).<strong>Name<\/strong> = <em>sheetname<\/em><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Sheets \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u3001<span class=\"red\"><strong>Worksheets \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u3001<span class=\"red\"><strong>Charts \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>before, after, count, type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u4e0a\u8a18 <strong>Add \u30e1\u30bd\u30c3\u30c9<\/strong>\u306e\u5f15\u6570\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>sheetname&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8a2d\u5b9a\u3059\u308b\u30b7\u30fc\u30c8\u540d\u3092\u6587\u5b57\u5217\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>\u300cTEST\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u65b0\u898f\u306b\u4f5c\u6210\u3059\u308b\u4f8b<\/strong><br \/>\n      \u3000\u3000<strong>Worksheets<\/strong>.<strong>Add<\/strong><br \/>\n      \u3000\u3000<strong>Activesheet<\/strong>.<strong>Name<\/strong> = &#8220;TEST&#8221;<br \/>\n      \u3000\u3000<br \/>\n      <strong>\u4e0a\u8a18\u3092\uff11\u884c\u3067\u66f8\u304f\u4f8b<\/strong><br \/>\n\t\u3000\u3000<strong>Worksheets<\/strong>.<strong>Add<\/strong>.<strong>Name<\/strong> = &#8220;TEST&#8221;\n    <\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u6307\u5b9a\u3057\u305f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u524a\u9664<\/h2>\n<div class=\"m30-l\">\n<p><strong>Delete \u30e1\u30bd\u30c3\u30c9<\/strong> \u3067\u3001\u6307\u5b9a\u3057\u305f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Delete<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Sheet \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3001<span class=\"red\"><strong>Worksheet \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3001<span class=\"red\"><strong>Chart \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li><em>object<\/em> \u3067\u6307\u5b9a\u3057\u305f\u30b7\u30fc\u30c8\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Delete \u30e1\u30bd\u30c3\u30c9<\/strong> \u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u524a\u9664\u3059\u308b\u524d\u306b\u3001\u78ba\u8a8d\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u78ba\u8a8d\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3055\u305b\u305a\u306b\u524a\u9664\u3059\u308b\u306b\u306f\u3001\u4e00\u6642\u7684\u306b\u3001<strong>DisplayAlerts \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092 <strong>False<\/strong> \u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n      \u3000<strong>Application.DisplayAlerts = False<\/strong><br \/>\n      \u3000<em>ActiveWorksheet<\/em>.<strong>Delete<\/strong><br \/>\n      \u3000<strong>Application.DisplayAlerts = True<\/strong>\n    <\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Add \u30e1\u30bd\u30c3\u30c9\u30fbDelete \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"Add \u30e1\u30bd\u30c3\u30c9\u30fbDelete \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_WSht_Add_Delete()\r\n\r\n        \r\n    '\u65b0\u898f\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u300cSheet2\u300d\u306e\u76f4\u5f8c\u306b\u633f\u5165\r\n    Application.Worksheets.Add after:=Worksheets(\"Sheet2\")\r\n        \r\n    \r\n    '\u300cSheet1\u300d\u3092\u524a\u9664\r\n    Application.DisplayAlerts = False\r\n    \r\n    Worksheets(\"Sheet1\").Delete\r\n    \r\n    Application.DisplayAlerts = True\r\n\r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9 \u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01.jpg?ssl=1\" rel=\"lightbox[3774]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01.jpg?resize=580%2C402&#038;ssl=1\" alt=\"Add \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b 1\" width=\"580\" height=\"402\" class=\"alignnone size-large wp-image-3776\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01.jpg?resize=580%2C402&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01.jpg?resize=400%2C277&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01.jpg?w=683&amp;ssl=1 683w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete02.jpg?ssl=1\" rel=\"lightbox[3774]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete02.jpg?resize=580%2C402&#038;ssl=1\" alt=\"Add \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b 2\" width=\"580\" height=\"402\" class=\"alignnone size-large wp-image-3777\" srcset=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete02.jpg?resize=580%2C402&amp;ssl=1 580w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete02.jpg?resize=400%2C277&amp;ssl=1 400w, https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete02.jpg?w=683&amp;ssl=1 683w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u3057\u3044\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u4f5c\u6210 Add \u30e1\u30bd\u30c3\u30c9\u3067\u3001\u65b0\u3057\u3044\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u305f\u5834\u6240\u306b &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3813,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[357],"tags":[558,318,63,311,559,38,360],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/wshtadddelete01-580x4021.jpg?fit=580%2C402&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-YS","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3774"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=3774"}],"version-history":[{"count":11,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3774\/revisions"}],"predecessor-version":[{"id":4153,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3774\/revisions\/4153"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3813"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}