{"id":4121,"date":"2015-10-29T09:06:48","date_gmt":"2015-10-29T00:06:48","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=4121"},"modified":"2016-01-12T22:15:34","modified_gmt":"2016-01-12T13:15:34","slug":"sheettabcolor","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/sheettabcolor\/","title":{"rendered":"\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u8a2d\u5b9a\uff08Tab \u30d7\u30ed\u30d1\u30c6\u30a3\uff09"},"content":{"rendered":"<h2>\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u8a2d\u5b9a<\/h2>\n<div class=\"m30-l\">\n<p><strong>Tab \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u306e <strong>Color \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>ColorIndex \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>ThemeColor \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306a\u3069\u3092\u4f7f\u7528\u3059\u308b\u3068\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u3084\u30b0\u30e9\u30d5\u306e\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<br \/>\n<h3>Tab \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Tab<\/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>Worksheet \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3001<strong>Chart \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>Tab.Color \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Color<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Color<\/strong> = <em>rgb<\/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>Tab \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>rgb&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>RGB \u5024<\/strong>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u307e\u305f\u3001<strong>False<\/strong> \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u306e\u8a2d\u5b9a\u3092\u89e3\u9664\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Color \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306b\u95a2\u3057\u3066\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/colorrgb\/\">\u8272\u306e\u8a2d\u5b9a\uff08Color \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbRGB \u95a2\u6570\uff09<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<h3>Tab.ColorIndex \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>ColorIndex<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>ColorIndex<\/strong> = <em>index<\/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>Tab \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>index&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>\u30ab\u30e9\u30fc\u30d1\u30ec\u30c3\u30c8<\/strong>\u306e\u8272\u3092\u8868\u3059 <strong>1 \uff5e 56 \u306e\u30d1\u30ec\u30c3\u30c8\u756a\u53f7<\/strong>\u3001\u307e\u305f\u306f\u3001<strong>XlColorIndex \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u307e\u305f\u306f\u305d\u306e\u5024\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<table>\n<tr>\n<td align = \"center\" width=\"200\" bgcolor=\"#ffffccc\"><strong>\u5b9a\u6570<\/strong><\/td>\n<td align = \"center\" width=\"50\" bgcolor=\"#ffffccc\"><strong>\u5024<\/strong><\/td>\n<td align = \"center\" width=\"400\" bgcolor=\"#ffffccc\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"200\">xlColorIndexAutomatic<\/td>\n<td width=\"50\" align = \"center\">-4105<\/td>\n<td width=\"400\">\u81ea\u52d5\u8a2d\u5b9a<\/td>\n<\/tr>\n<tr>\n<td width=\"200\">xlColorIndexNone<\/td>\n<td width=\"50\" align = \"center\">-4142<\/td>\n<td width=\"400\">\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u306e\u8a2d\u5b9a\u3092\u89e3\u9664<\/td>\n<\/tr>\n<\/table>\n<p>\n      <\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>ColorIndex \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306b\u95a2\u3057\u3066\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/colorindexcolors\/\">\u8272\u306e\u8a2d\u5b9a\uff08ColorIndex \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbColors \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/p><\/div>\n<br \/>\n<h3>Tab.ThemeColor \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbTab.TintAndShade \u30d7\u30ed\u30d1\u30c6\u30a3<\/h3>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u53d6\u5f97\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>ThemeColor<\/strong><br \/>\n    <em>object<\/em>.<strong>TintAndShade<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u8a2d\u5b9a\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>ThemeColor<\/strong> = <em>index<\/em><br \/>\n    <em>object<\/em>.<strong>TintAndShade<\/strong> = <em>single<\/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>Tab \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>index&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30c6\u30fc\u30de\u30ab\u30e9\u30fc\u306e\u57fa\u672c\u8272\u3092\u8868\u3059 <strong>MsoThemeColorSchemeindex \u5217\u6319\u578b<\/strong>\uff08\u307e\u305f\u306f <strong>XlThemeColor \u5217\u6319\u578b<\/strong>\uff09\u306e\u5b9a\u6570\u307e\u305f\u306f\u5024\uff08<strong>1 \uff5e 12<\/strong>\uff09\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>single&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u8272\u306e\u660e\u308b\u3055\u3092 <strong>-1\uff08\u6697\u3044\uff09<\/strong> \uff5e <strong>1\uff08\u660e\u308b\u3044\uff09<\/strong>\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Tab.ThemeColor \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>Tab.TintAndShade \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306b\u95a2\u3057\u3066\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/themecolorshade\/\">\u8272\u306e\u8a2d\u5b9a\uff08ThemeColor \u30d7\u30ed\u30d1\u30c6\u30a3\u30fbTintAndShade \u30d7\u30ed\u30d1\u30c6\u30a3\uff09<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p class=\"caution8\"><strong>Tab.ThemeColor \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3001<strong>Tab.TintAndShade \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306f\u3001Excel 2007 \u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u307f\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Tab \u30d7\u30ed\u30d1\u30c6\u30a3 \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=\"\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u5909\u66f4\u3059\u308b\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_Tab()\r\n\r\n    Dim i As Long\r\n    \r\n    For i = 1 To Worksheets.Count\r\n    \r\n        If i Mod 2 = 0 Then\r\n        \r\n            '\u5de6\u304b\u3089\u5076\u6570\u756a\u76ee\u306e\u30b7\u30fc\u30c8\u306e\u898b\u51fa\u3057\u306e\u8272\u306e\u8a2d\u5b9a\u3092\u89e3\u9664\r\n            ActiveWorkbook.Worksheets(i).Tab.Color = False\r\n        \r\n        Else\r\n            \r\n            '\u5de6\u304b\u3089\u5947\u6570\u756a\u76ee\u306e\u30b7\u30fc\u30c8\u306e\u898b\u51fa\u3057\u306e\u8272\u3092\u9752\u306b\u3059\u308b\r\n            ActiveWorkbook.Worksheets(i).Tab.Color = RGB(0, 0, 255)\r\n        \r\n        End If\r\n    \r\n    Next i\r\n    \r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/tabcolor01.jpg?ssl=1\" rel=\"lightbox[4121]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/tabcolor01.jpg?resize=484%2C296&#038;ssl=1\" alt=\"\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u8a2d\u5b9a\" width=\"484\" height=\"296\" class=\"alignnone size-full wp-image-4122\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/tabcolor01.jpg?w=484&amp;ssl=1 484w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/tabcolor01.jpg?resize=400%2C245&amp;ssl=1 400w\" sizes=\"(max-width: 484px) 100vw, 484px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u30b7\u30fc\u30c8\u898b\u51fa\u3057\u306e\u8272\u3092\u8a2d\u5b9a Tab \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e Color \u30d7\u30ed\u30d1\u30c6\u30a3\u3001Colo &#8230; <\/p>\n","protected":false},"author":1,"featured_media":4122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[357],"tags":[404,411,634,413,414,63,38,360],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/10\/tabcolor01.jpg?fit=484%2C296&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-14t","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4121"}],"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=4121"}],"version-history":[{"count":6,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4121\/revisions"}],"predecessor-version":[{"id":4885,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4121\/revisions\/4885"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/4122"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=4121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=4121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=4121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}