{"id":538,"date":"2025-02-19T02:33:39","date_gmt":"2025-02-18T17:33:39","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/02\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e6%a5%ad%e5%8b%99%e5%8a%b9%e7%8e%87%e3%82%92%e5%8a%87%e7%9a%84%e3%81%ab%e5%90%91%e4%b8%8a%e3%81%95%e3%81%9b%e3%82%8b%e3%82%ab%e3%82%b9\/"},"modified":"2025-02-19T02:33:39","modified_gmt":"2025-02-18T17:33:39","slug":"excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e6%a5%ad%e5%8b%99%e5%8a%b9%e7%8e%87%e3%82%92%e5%8a%87%e7%9a%84%e3%81%ab%e5%90%91%e4%b8%8a%e3%81%95%e3%81%9b%e3%82%8b%e3%82%ab%e3%82%b9","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/02\/excel%e4%b8%8a%e7%b4%9a%e8%80%85%e5%bf%85%e8%a6%8b%ef%bc%81%e6%a5%ad%e5%8b%99%e5%8a%b9%e7%8e%87%e3%82%92%e5%8a%87%e7%9a%84%e3%81%ab%e5%90%91%e4%b8%8a%e3%81%95%e3%81%9b%e3%82%8b%e3%82%ab%e3%82%b9\/","title":{"rendered":"Excel\u4e0a\u7d1a\u8005\u5fc5\u898b\uff01\u696d\u52d9\u52b9\u7387\u3092\u5287\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u958b\u767a\u30c6\u30af\u30cb\u30c3\u30af"},"content":{"rendered":"<h2>Excel\u4e0a\u7d1a\u8005\u304c\u7fd2\u5f97\u3059\u3079\u304d\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u958b\u767a\u30c6\u30af\u30cb\u30c3\u30af<\/h2>\n<p>\u4e0a\u7d1a\u8005\u5411\u3051\u306e\u4fbf\u5229\u306a\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a<br \/>\n&#8220;`vba<br \/>\nSub AddCustomRibbonTab()<br \/>\n    Dim ribbonXml As String<br \/>\n    ribbonXml = &#8220;<customUI xmlns='http:\/\/schemas.microsoft.com\/office\/2009\/07\/customui'>&#8221; &#038; _<br \/>\n                &#8220;<ribbon><tabs><tab id='CustomTab' label='\u30ab\u30b9\u30bf\u30e0\u30bf\u30d6'>&#8221; &#038; _<br \/>\n                &#8220;<group id='CustomGroup' label='\u30ab\u30b9\u30bf\u30e0\u30b0\u30eb\u30fc\u30d7'>&#8221; &#038; _<br \/>\n                &#8220;<button id='CustomButton' label='\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3' onAction='CustomButtonClick' \/>&#8221; &#038; _<br \/>\n                &#8220;<\/group><\/tab><\/tabs><\/ribbon><\/customUI>&#8221;<\/p>\n<p>    ActiveWorkbook.CustomDocumentProperties.Add _<br \/>\n        Name:=&#8221;RibbonXML&#8221;, _<br \/>\n        LinkToContent:=False, _<br \/>\n        Type:=msoPropertyTypeString, _<br \/>\n        Value:=ribbonXml<\/p>\n<p>    MsgBox &#8220;\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u30bf\u30d6\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002Excel\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002&#8221;<br \/>\nEnd Sub<\/p>\n<p>Sub CustomButtonClick(control As IRibbonControl)<br \/>\n    MsgBox &#8220;\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u307e\u3057\u305f\uff01&#8221;<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<h3>1. \u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u306e\u57fa\u672c\u6982\u5ff5<\/h3>\n<p>Excel \u30de\u30af\u30ed\u3092\u6d3b\u7528\u3057\u3066\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u306f\u3001\u4e0a\u7d1a\u8005\u306b\u3068\u3063\u3066\u975e\u5e38\u306b\u5f37\u529b\u306a\u30b9\u30ad\u30eb\u3067\u3059\u3002\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u3068\u306f\u3001Excel\u306e\u6a19\u6e96\u7684\u306a\u30ea\u30dc\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u72ec\u81ea\u306e\u30bf\u30d6\u3084\u30dc\u30bf\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6a5f\u80fd\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u983b\u7e41\u306b\u4f7f\u7528\u3059\u308b\u6a5f\u80fd\u3084\u81ea\u4f5c\u306e\u30de\u30af\u30ed\u3092\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u306e\u958b\u767a\u306b\u306f\u3001\u4e3b\u306bXML\u3068VBA\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002XML\u3067\u30ea\u30dc\u30f3\u306e\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u3001VBA\u30b3\u30fc\u30c9\u3067\u30dc\u30bf\u30f3\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u3053\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308a\u3001\u898b\u305f\u76ee\u3082\u6a5f\u80fd\u3082\u5b8c\u5168\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u305f\u30ea\u30dc\u30f3\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>2. XML\u306b\u3088\u308b\u30ea\u30dc\u30f3\u69cb\u9020\u306e\u5b9a\u7fa9<\/h3>\n<p>\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u306e\u9aa8\u683c\u3068\u306a\u308b\u306e\u304cXML\u3067\u3059\u3002XML\u3092\u4f7f\u7528\u3057\u3066\u3001\u65b0\u3057\u3044\u30bf\u30d6\u3001\u30b0\u30eb\u30fc\u30d7\u3001\u30dc\u30bf\u30f3\u306a\u3069\u306e\u8981\u7d20\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u57fa\u672c\u7684\u306aXML\u69cb\u9020\u306e\u4f8b\u3067\u3059\uff1a<\/p>\n<p>&#8220;`xml<br \/>\n<customUI xmlns=\"http:\/\/schemas.microsoft.com\/office\/2009\/07\/customui\"><br \/>\n  <ribbon><br \/>\n    <tabs><br \/>\n      <tab id=\"CustomTab\" label=\"\u30ab\u30b9\u30bf\u30e0\u30bf\u30d6\"><br \/>\n        <group id=\"CustomGroup\" label=\"\u30ab\u30b9\u30bf\u30e0\u30b0\u30eb\u30fc\u30d7\"><br \/>\n          <button id=\"CustomButton\" label=\"\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\" onAction=\"CustomButtonClick\" \/><br \/>\n        <\/group><br \/>\n      <\/tab><br \/>\n    <\/tabs><br \/>\n  <\/ribbon><br \/>\n<\/customUI><br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u300c\u30ab\u30b9\u30bf\u30e0\u30bf\u30d6\u300d\u3068\u3044\u3046\u65b0\u3057\u3044\u30bf\u30d6\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u4e2d\u306b\u300c\u30ab\u30b9\u30bf\u30e0\u30b0\u30eb\u30fc\u30d7\u300d\u3068\u3044\u3046\u30b0\u30eb\u30fc\u30d7\u3001\u3055\u3089\u306b\u305d\u306e\u4e2d\u306b\u300c\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\u300d\u3068\u3044\u3046\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>XML\u306e\u69cb\u9020\u3092\u7406\u89e3\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8981\u7d20\u3092\u8ffd\u52a0\u30fb\u4fee\u6b63\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u8907\u96d1\u3067\u6a5f\u80fd\u7684\u306a\u30ea\u30dc\u30f3\u3092\u8a2d\u8a08\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u3084\u5207\u308a\u66ff\u3048\u30dc\u30bf\u30f3\u306a\u3069\u3082\u8ffd\u52a0\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>3. VBA\u30b3\u30fc\u30c9\u306b\u3088\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u5b9f\u88c5<\/h3>\n<p>XML\u3067\u5b9a\u7fa9\u3057\u305f\u30dc\u30bf\u30f3\u3084\u305d\u306e\u4ed6\u306e\u8981\u7d20\u306b\u6a5f\u80fd\u3092\u6301\u305f\u305b\u308b\u306e\u304cVBA\u30b3\u30fc\u30c9\u306e\u5f79\u5272\u3067\u3059\u3002Excel \u30de\u30af\u30ed\u3092\u4f7f\u3063\u3066\u3001\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306e\u52d5\u4f5c\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u5148\u307b\u3069\u306eXML\u3067\u5b9a\u7fa9\u3057\u305f\u300c\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\u300d\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306aVBA\u30b3\u30fc\u30c9\u3067\u5b9f\u88c5\u3067\u304d\u307e\u3059\uff1a<\/p>\n<p>&#8220;`vba<br \/>\nSub CustomButtonClick(control As IRibbonControl)<br \/>\n    MsgBox &#8220;\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u307e\u3057\u305f\uff01&#8221;<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u5358\u7d14\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c3\u30af\u30b9\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5b9f\u969b\u306e\u4f7f\u7528\u3067\u306f\u8907\u96d1\u306a\u30de\u30af\u30ed\u3084\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c7\u30fc\u30bf\u306e\u6574\u5f62\u3001\u30b0\u30e9\u30d5\u306e\u4f5c\u6210\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u306e\u53d6\u308a\u8fbc\u307f\u306a\u3069\u3001\u3042\u3089\u3086\u308b Excel \u306e\u6a5f\u80fd\u3092\u6d3b\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30ea\u30dc\u30f3\u306e\u72b6\u614b\u3092\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u30b3\u30fc\u30c9\u3082\u5b9f\u88c5\u53ef\u80fd\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u7279\u5b9a\u306e\u6761\u4ef6\u4e0b\u3067\u30dc\u30bf\u30f3\u3092\u7121\u52b9\u5316\u3057\u305f\u308a\u3001\u30e9\u30d9\u30eb\u3092\u5909\u66f4\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u64cd\u4f5c\u3084\u6587\u66f8\u306e\u72b6\u614b\u306b\u5fdc\u3058\u3066\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30ea\u30dc\u30f3\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u306e\u958b\u767a\u306f\u3001Excel \u306e\u64cd\u4f5c\u6027\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u4e0a\u7d1a\u8005\u3067\u3042\u308c\u3070\u3001\u3053\u306e\u6280\u8853\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u52b9\u7387\u7684\u3067\u4f7f\u3044\u3084\u3059\u3044Excel\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u958b\u767a\u306b\u306f\u4e00\u5b9a\u306e\u5b66\u7fd2\u66f2\u7dda\u304c\u3042\u308b\u305f\u3081\u3001\u6bb5\u968e\u7684\u306b\u7406\u89e3\u3092\u6df1\u3081\u3066\u3044\u304f\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u4e0a\u7d1a\u8005\u304c\u7fd2\u5f97\u3059\u3079\u304d\u30ab\u30b9\u30bf\u30e0\u30ea\u30dc\u30f3\u958b\u767a\u30c6\u30af\u30cb\u30c3\u30af \u4e0a\u7d1a\u8005\u5411\u3051\u306e\u4fbf\u5229\u306a\u30de\u30af\u30ed\u30b3\u30fc\u30c9\uff1a #8220;`vba Sub AddCustomRibbonTab() Dim ribbonXml As String rib<\/p>\n","protected":false},"author":2,"featured_media":537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-538","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced"],"_links":{"self":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/comments?post=538"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/538\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/537"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}