{"id":4985,"date":"2016-01-26T13:25:37","date_gmt":"2016-01-26T04:25:37","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=4985"},"modified":"2016-01-28T12:22:02","modified_gmt":"2016-01-28T03:22:02","slug":"shortcutmenu","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/shortcutmenu\/","title":{"rendered":"\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09"},"content":{"rendered":"<h2>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09<\/h2>\n<div class=\"m30-l\">\n<p>\u53f3\u30af\u30ea\u30c3\u30af\u3067\u8868\u793a\u3055\u308c\u308b\u30e1\u30cb\u30e5\u30fc\u306e\u3053\u3068\u3092\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u307e\u305f\u306f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u3068\u3044\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u3001<strong>CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3067\u64cd\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<h3>\u4e3b\u306a\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09<\/h3>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u30bb\u30eb\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;Cell&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u884c\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;Row&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u5217\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;Column&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u30b7\u30fc\u30c8\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;Ply&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u30b0\u30e9\u30d5\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;chart&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u56f3\u5f62\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;shapes&#8221;)<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u30aa\u30fc\u30c8\u30d5\u30a3\u30eb\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>CommandBars(&#8220;autofill&#8221;)<\/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>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>Controls \u30d7\u30ed\u30d1\u30c6\u30a3<\/h2>\n<div class=\"m30-l\">\n<p>\u30b3\u30de\u30f3\u30c9\u30d0\u30fc\u306e\u3059\u3079\u3066\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u8868\u3059 <strong>CommandBarControls \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong>\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\uff08\u8aad\u307f\u53d6\u308a\u5c02\u7528\uff09<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Controls<\/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>CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\t\uff08\u4f8b\uff09CommandBars(&#8220;Cell&#8221;)\u3001CommandBars(&#8220;Row&#8221;)\u3001CommandBars(&#8220;Column&#8221;)\u3001CommandBars(&#8220;Ply&#8221;)\u3001CommandBars(&#8220;chart&#8221;) \u30b0\u30e9\u30d5\u3001CommandBars(&#8220;shapes&#8221;) \u56f3\u5f62\u3001CommandBars(&#8220;autofill&#8221;) \u30aa\u30fc\u30c8\u30d5\u30a3\u30eb \u306a\u3069<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u3078\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u767b\u9332\u3084\u8a2d\u5b9a\u306b\u3064\u3044\u3066<\/h2>\n<div class=\"m30-l\">\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u4f5c\u6210<\/h3>\n<p>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09\u4e0a\u306b\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u767b\u9332\u3059\u308b\u306b\u306f\u3001<strong>Controls.Add \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<strong>Controls.Add \u30e1\u30bd\u30c3\u30c9<\/strong>\u306f\u3001\u65b0\u3057\u3044 <strong>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3092\u4f5c\u6210\u3057\u3001\u6307\u5b9a\u3057\u305f <strong>CommandBarControls \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong>\u306b\u8ffd\u52a0\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>type<\/em>, <em>id<\/em>, <em>parameter<\/em>, <em>before<\/em>, <em>temporary<\/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>CommandBarControls \u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>type&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>MsoControl \u5217\u6319\u578b<\/strong> \u306e\u5b9a\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u6307\u5b9a\u3067\u304d\u308b\u306e\u306f\u3001<strong>msoControlButton<\/strong>\uff08\u901a\u5e38\u306e\u30dc\u30bf\u30f3\uff09\u307e\u305f\u306f\u3001<strong>msoControlPopup<\/strong>\uff08\u30b5\u30d6\u30e1\u30cb\u30e5\u30fc\u3092\u6301\u3064\u30dc\u30bf\u30f3\uff09\u306e\u3044\u305a\u308c\u304b\u3067\u3001\u7701\u7565\u3059\u308b\u3068 <strong>msoControlButton<\/strong> \u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3068\u540c\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/li>\n<li>id&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;Excel \u304c\u6301\u3064\u65e2\u5b58\u306e\u6a5f\u80fd\u3092\u5272\u308a\u5f53\u3066\u305f\u3044\u5834\u5408\u306b\u306e\u307f\u3001\u305d\u306e\u6a5f\u80fd\u3092\u8868\u3059 <strong>ID \u756a\u53f7<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\t\uff08\u4f8b\uff09\u6a5f\u80fd(ID \u756a\u53f7)<br \/>\n\t\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\uff0823\uff09\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u9589\u3058\u308b\uff08106\uff09\u3001\u4e0a\u66f8\u304d\u4fdd\u5b58\uff083\uff09\u3001\u30b3\u30d4\u30fc\uff0819\uff09\u306a\u3069<\/li>\n<li>parameter&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3067\u4f7f\u7528\u3059\u308b\u5f15\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\uff08\u7701\u7565\u53ef\uff09<br \/>\n\t\uff08\u4f8b\uff09\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u5185\u3067\u3053\u306e\u5024\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001<br \/>\n\t<strong>Application.CommandBars.ActionControl.Parameter<\/strong><br \/>\n\t\u3000\u3068\u3057\u307e\u3059\u3002<\/li>\n<li>before&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u767b\u9332\u3059\u308b\u4f4d\u7f6e\u3092 1 \u4ee5\u4e0a\u306e\u6574\u6570\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\uff08\u7701\u7565\u53ef\uff09<br \/>\n\t\uff08\u4f8b\uff09Before:= 1\u3000\u3000\u3053\u306e\u5834\u5408\u3001\u30e1\u30cb\u30e5\u30fc\u306e\u4e00\u756a\u4e0a\u306b\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>temporary&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>True<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3068\u30a8\u30af\u30bb\u30eb\u7d42\u4e86\u6642\u306b\u524a\u9664\u3055\u308c\u307e\u3059\u3002\u898f\u5b9a\u5024\u306f\u3001<strong>False<\/strong> \u3067\u3059\u3002\uff08\u7701\u7565\u53ef\uff09<\/li>\n<li>\u623b\u308a\u5024&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u540d\u524d\u3092\u8a2d\u5b9a<\/h3>\n<p>\u767b\u9332\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u540d\u524d\uff08\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8868\u793a\u3055\u308c\u308b\u6587\u5b57\u5217\uff09\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3092\u884c\u3046\u306b\u306f\u3001<strong>Caption \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Caption<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30de\u30af\u30ed\u3092\u767b\u9332\u3059\u308b<\/h3>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30de\u30af\u30ed\u3092\u767b\u9332\u3059\u308b\u306b\u306f\u3001<strong>OnAction \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b\u3001\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed\u540d\uff08\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d\uff09\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>OnAction<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\"><strong>\u30de\u30af\u30ed\u306e\u6307\u5b9a\u65b9\u6cd5<\/strong><br \/>\n    \uff08\u4f8b\uff09\u30de\u30af\u30ed\u540d\u3092\u3001TestMacro \u3068\u3059\u308b\u3068\u3001<br \/>\n    \u3000\u3000\u3000.OnAction = &#8220;TestMacro&#8221;<br \/>\n    \u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\"><strong>\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5 1<\/strong><br \/>\n    <strong>CommandBarControls.Add \u30e1\u30bd\u30c3\u30c9<\/strong> \u306e\u5f15\u6570 <em>parameter<\/em> \u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n    \uff08\u4f8b\uff09CommandBars(&#8220;Cell&#8221;).Controls.Add(Parameter:=&#8221;\u3053\u3093\u306b\u3061\u306f\uff01&#8221;)<\/p>\n<p class=\"caution4\"><strong>\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5 2<\/strong><br \/>\n    <strong>CommandBarControl.OnAction \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b\u3001\u5f15\u6570\u3092\u542b\u3081\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n    \uff08\u4f8b\uff09\u30de\u30af\u30ed\u540d\u3092\u3001TestMacro \u3068\u3059\u308b\u3068\u3001<br \/>\n    \u3000\u3000\u3000.OnAction = &#8220;&#8216;TestMacro(&#8220;&#8221;\u3053\u3093\u306b\u3061\u306f\uff01&#8221;&#8221;)'&#8221;<br \/>\n    \u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<h3>\u533a\u5207\u308a\u7dda\u3092\u633f\u5165\u3059\u308b<\/h3>\n<p><strong>BeginGroup<\/strong> \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3001<strong>True<\/strong> \u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u6307\u5b9a\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u4e0a\u90e8\u306b\u533a\u5207\u308a\u7dda\u3092\u5165\u308c\u308b\u3053\u3068\u304c\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>BeginGroup<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30a2\u30a4\u30b3\u30f3\uff08\u30dc\u30bf\u30f3\u306e\u30a4\u30e1\u30fc\u30b8\uff09\u3092\u8868\u793a\u3059\u308b<\/h3>\n<p>\u30a2\u30a4\u30b3\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001<strong>FaceId \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b\u3001\u30a2\u30a4\u30b3\u30f3\u3092\u8868\u3059\u6570\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>FaceId<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u60c5\u5831\u30fb\u8aac\u660e\u7b49\u3092\u8a2d\u5b9a<\/h3>\n<p><strong>Tag \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u6307\u5b9a\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3084\u8aac\u660e\u7b49\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\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>Tag<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u8868\u793a\u30fb\u975e\u8868\u793a\u3092\u8a2d\u5b9a<\/h3>\n<p>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u3001<strong>Visible \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b <strong>True<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\uff08\u65e2\u5b9a\u5024\uff09\u3002\u975e\u8868\u793a\u306b\u3059\u308b\u306b\u306f\u3001<strong>False<\/strong> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Visible<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u308b<\/h3>\n<p><strong>State \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong>\u306b <strong>True<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3068\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09\u3092\u8868\u793a\u3057\u305f\u6642\u3001\u6307\u5b9a\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30c1\u30a7\u30c3\u30af\u30de\u30fc\u30af\u304c\u8868\u793a\u3057\u307e\u3059\u3002<strong>False<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u5143\u306e\u72b6\u614b\u306b\u623b\u308a\u307e\u3059\u3002\u30d6\u30fc\u30eb\u578b\uff08Boolean\uff09\u306e\u5024\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>State<\/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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u524a\u9664<\/h2>\n<div class=\"m30-l\">\n<p>\u767b\u9332\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u3001<strong>Delete \u30e1\u30bd\u30c3\u30c9<\/strong>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5b58\u5728\u3057\u306a\u3044\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u524a\u9664\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\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>CommandBarControl \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\n    CommandBars(&#8220;Cell&#8221;).Controls(&#8220;<em>\u524a\u9664\u3059\u308b\u30b3\u30de\u30f3\u30c9\u540d<\/em>&#8220;).Delete<br \/>\n    CommandBars(&#8220;Cell&#8221;).Controls(<em>Index \u756a\u53f7<\/em>).Delete<br \/>\n    \u203b CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001<strong>Index \u5024<\/strong>\uff08\u9577\u6574\u6570\u578b\uff09\u3092\u4f7f\u3063\u3066\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09\u3092\u521d\u671f\u5316<\/h2>\n<div class=\"m30-l\">\n<p>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09\u3092\u521d\u671f\u72b6\u614b\u306b\u623b\u3059\u306b\u306f\u3001<strong>CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306e <strong>Reset \u30e1\u30bd\u30c3\u30c9<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30a2\u30c9\u30a4\u30f3\u3092\u8a2d\u5b9a\u3057\u305f\u6642\u306b\u767b\u9332\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3082\u6d88\u3048\u3066\u3057\u307e\u3046\u306e\u3067\u4f7f\u7528\u6642\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>Reset<\/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>CommandBar \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\t\uff08\u4f8b\uff09CommandBars(&#8220;Cell&#8221;)\u3001CommandBars(&#8220;Row&#8221;)\u3001CommandBars(&#8220;Column&#8221;)\u3001CommandBars(&#8220;Ply&#8221;)\u3001CommandBars(&#8220;chart&#8221;) \u30b0\u30e9\u30d5\u3001CommandBars(&#8220;shapes&#8221;) \u56f3\u5f62\u3001CommandBars(&#8220;autofill&#8221;) \u30aa\u30fc\u30c8\u30d5\u30a3\u30eb \u306a\u3069<\/li>\n<\/ul><\/div>\n<\/div>\n<br \/><br \/>\n<h2>\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff09\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=\"\u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\n\r\nSub test01()\r\n\r\n    MsgBox Application.CommandBars.ActionControl.Parameter\r\n\r\nEnd Sub\r\n\r\nSub test02(value)\r\n\r\n    MsgBox value\r\n\r\nEnd Sub\r\n\r\nSub test03()\r\n\r\n    MsgBox \"test03 \u5b9f\u884c\u3057\u307e\u3057\u305f\"\r\n\r\nEnd Sub\r\n\r\nSub Sample_CommandBars_Cell_01()\r\n    \r\n    Dim str As String\r\n    Dim cbar1 As CommandBarControl\r\n    Dim cbar2 As CommandBarControl\r\n    Dim cbar3 As CommandBarControl\r\n    Dim cbar4 As CommandBarControl\r\n    \r\n    str = \"\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\"\r\n    \r\n    '\u30bb\u30eb\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u3092\u521d\u671f\u5316\r\n    CommandBars(\"Cell\").Reset\r\n\r\n    \r\n    '\u30bb\u30eb\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u5f15\u6570\u6307\u5b9a\u3001\u30d6\u30c3\u30af\u3092\u9589\u3058\u305f\u5f8c\u524a\u9664\uff09\r\n    Set cbar1 = CommandBars(\"Cell\").Controls.Add(Parameter:=str, temporary:=True)\r\n    '\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8868\u793a\u3059\u308b\u540d\u524d\u306e\u8a2d\u5b9a\r\n    cbar1.Caption = \"test01\"\r\n    '\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306b\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d\u3092\u767b\u9332\r\n    cbar1.OnAction = \"test01\"\r\n    \r\n    \r\n    '\u30bb\u30eb\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u30d6\u30c3\u30af\u3092\u9589\u3058\u3066\u3082\u524a\u9664\u3057\u306a\u3044\uff09\r\n    Set cbar2 = CommandBars(\"Cell\").Controls.Add\r\n    '\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8868\u793a\u3059\u308b\u540d\u524d\u306e\u8a2d\u5b9a\r\n    cbar2.Caption = \"test02\"\r\n    '\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306b\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d\u3092\u767b\u9332\r\n    cbar2.OnAction = \"'test02(\"\"\u3042\u3044\u3046\"\")'\"\r\n    '\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u30c1\u30a7\u30c3\u30af\u30de\u30fc\u30af\u3092\u8868\u793a\r\n    cbar2.State = True\r\n\r\n\r\n    '\u30bb\u30eb\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u30b5\u30d6\u30e1\u30cb\u30e5\u30fc\u3092\u6301\u3064\u30dc\u30bf\u30f3\u3001\u30d6\u30c3\u30af\u3092\u9589\u3058\u305f\u5f8c\u524a\u9664\uff09\r\n    Set cbar3 = CommandBars(\"Cell\").Controls.Add(Type:=msoControlPopup, temporary:=True)\r\n    '\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\u306b\u8868\u793a\u3059\u308b\u540d\u524d\u306e\u8a2d\u5b9a\r\n    cbar3.Caption = \"\u30e1\u30cb\u30e5\u30fc\"\r\n    \r\n    \r\n    '\u30b5\u30d6\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u30d6\u30c3\u30af\u3092\u9589\u3058\u305f\u5f8c\u524a\u9664\uff09\r\n    With cbar3.Controls.Add(temporary:=True)\r\n        '\u540d\u524d\u306e\u8a2d\u5b9a\r\n        .Caption = \"\u30b3\u30de\u30f3\u30c91\"\r\n        '\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u6642\u306b\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u540d\u3092\u767b\u9332\r\n        .OnAction = \"test03\"\r\n        'Tag \u306e\u8a2d\u5b9a\r\n        .Tag = \"\u30b5\u30d6\uff1a\u30b3\u30de\u30f3\u30c91\"\r\n    End With\r\n    \r\n    '\u30b5\u30d6\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u30d6\u30c3\u30af\u3092\u9589\u3058\u305f\u5f8c\u524a\u9664\uff09\r\n    With cbar3.Controls.Add(temporary:=True)\r\n        '\u540d\u524d\u306e\u8a2d\u5b9a\r\n        .Caption = \"\u30b3\u30de\u30f3\u30c92\"\r\n        '\u8868\u793a\u3057\u306a\u3044\r\n        .Visible = False\r\n        'Tag \u306e\u8a2d\u5b9a\r\n        .Tag = \"\u30b5\u30d6\uff1a\u30b3\u30de\u30f3\u30c92\"\r\n    End With\r\n    \r\n    '\u30b5\u30d6\u30e1\u30cb\u30e5\u30fc\u306b\u8ffd\u52a0\uff08\u30d6\u30c3\u30af\u3092\u9589\u3058\u305f\u5f8c\u524a\u9664\uff09\r\n    With cbar3.Controls.Add(temporary:=True)\r\n        '\u540d\u524d\u306e\u8a2d\u5b9a\r\n        .Caption = \"\u30b3\u30de\u30f3\u30c93\"\r\n        'Tag \u306e\u8a2d\u5b9a\r\n        .Tag = \"\u30b5\u30d6\uff1a\u30b3\u30de\u30f3\u30c93\"\r\n    End With\r\n        \r\n    \r\n    '\u533a\u5207\u308a\u7dda\u3092\u633f\u5165\u3059\u308b\r\n    CommandBars(\"Cell\").Controls.Item(cbar3.Index).BeginGroup = True\r\n    \r\n    '\u30b3\u30de\u30f3\u30c93 \u3092\u524a\u9664\r\n    Dim c As CommandBarControl\r\n    For Each c In cbar3.Controls\r\n        If c.Tag = \"\u30b5\u30d6\uff1a\u30b3\u30de\u30f3\u30c93\" Then\r\n            c.Delete\r\n        End If\r\n    Next c\r\n    \r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>Sample_CommandBars_Cell_01() \u3092\u5b9f\u884c<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/01\/shortcutmenu01.jpg?ssl=1\" rel=\"lightbox[4985]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/01\/shortcutmenu01.jpg?resize=333%2C505&#038;ssl=1\" alt=\"\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\" width=\"333\" height=\"505\" class=\"alignnone size-full wp-image-4992\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/01\/shortcutmenu01.jpg?w=333&amp;ssl=1 333w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/01\/shortcutmenu01.jpg?resize=264%2C400&amp;ssl=1 264w\" sizes=\"(max-width: 333px) 100vw, 333px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30e1\u30cb\u30e5\u30fc\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\uff09 \u53f3\u30af\u30ea\u30c3\u30af\u3067\u8868\u793a\u3055\u308c\u308b\u30e1\u30cb\u30e5\u30fc\u306e &#8230; <\/p>\n","protected":false},"author":1,"featured_media":4992,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[37],"tags":[301,779,778,63,38,781,780],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2016\/01\/shortcutmenu01.jpg?fit=333%2C505&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-1ip","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4985"}],"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=4985"}],"version-history":[{"count":8,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4985\/revisions"}],"predecessor-version":[{"id":5003,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4985\/revisions\/5003"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/4992"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=4985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=4985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=4985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}