<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The Easy Way to Find Right Click Menus</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/11/24/the-easy-way-to-find-right-click-menus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/11/24/the-easy-way-to-find-right-click-menus/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: jkpieterse</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/11/24/the-easy-way-to-find-right-click-menus/#comment-2685</link>
		<dc:creator>jkpieterse</dc:creator>
		<pubDate>Tue, 30 Nov 2004 20:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=879#comment-2685</guid>
		<description>&lt;p&gt;And if you like to see a listing of all menubars in Excel, WOrd, Acces and such, have a look at my xlmenufundict available from &lt;a href=&quot;http://www.jkp-ads.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.jkp-ads.com&lt;/a&gt;. You can even see what the Japanese have to put up with for their menus &lt;smile&gt;&lt;/smile&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>And if you like to see a listing of all menubars in Excel, WOrd, Acces and such, have a look at my xlmenufundict available from <a href="http://www.jkp-ads.com/" rel="nofollow">http://www.jkp-ads.com</a>. You can even see what the Japanese have to put up with for their menus <smile></smile></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: d</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/11/24/the-easy-way-to-find-right-click-menus/#comment-2638</link>
		<dc:creator>d</dc:creator>
		<pubDate>Wed, 24 Nov 2004 18:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=879#comment-2638</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;I liked this problem.  I came up with something along the same lines but not so simple.  It prints out all the controls&#039; IDs as well.  I&#039;ve gotten burned by referring to controls by their captions - the captions sometimes change names slightly, e.g., &quot;Column Width...&quot; becomes &quot;Width...&quot;  I think that IDs stay the same:&lt;/p&gt;
&lt;p&gt;Sub add_popup_names_button()&lt;br&gt;
Dim cbar As CommandBar&lt;br&gt;
Dim cbutton As CommandBarButton&lt;/p&gt;
&lt;p&gt;For Each cbar In Application.CommandBars&lt;br&gt;
    With cbar&lt;br&gt;
        If .Type = msoBarTypePopup Then&lt;br&gt;
            Set cbutton = .Controls.Add(temporary:=True)&lt;br&gt;
            With cbutton&lt;br&gt;
                .Caption = &quot;Show popup info&quot;&lt;br&gt;
                .Style = msoButtonIconAndCaption&lt;br&gt;
                .FaceId = 284&lt;br&gt;
                .OnAction = &quot;show_popup_info&quot;&lt;br&gt;
            End With&lt;br&gt;
        End If&lt;br&gt;
    End With&lt;br&gt;
Next cbar&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;Sub show_popup_info()&lt;br&gt;
Dim i As Integer&lt;/p&gt;
&lt;p&gt;With CommandBars.ActionControl.Parent&lt;br&gt;
    Debug.Print &quot;Menu = &quot; &amp; .Name &amp; String(7, &quot; &quot;) &amp; &quot;Index = &quot; &amp; .Index &amp; vbLf&lt;br&gt;
    Debug.Print &quot;Caption&quot; &amp; String(17, &quot; &quot;) &amp; &quot;ID&quot;&lt;br&gt;
    For i = 1 To .Controls.Count - 1&lt;br&gt;
        With .Controls(i)&lt;br&gt;
            Debug.Print &quot; &quot; &amp; .Caption &amp; String(22 - Len(.Caption), &quot; &quot;) &amp; .ID&lt;br&gt;
        End With&lt;br&gt;
    Next i&lt;br&gt;
End With&lt;br&gt;
Debug.Print vbLf&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>I liked this problem.  I came up with something along the same lines but not so simple.  It prints out all the controls&#8217; IDs as well.  I&#8217;ve gotten burned by referring to controls by their captions &#8211; the captions sometimes change names slightly, e.g., &#8220;Column Width&#8230;&#8221; becomes &#8220;Width&#8230;&#8221;  I think that IDs stay the same:</p>
<p>Sub add_popup_names_button()<br />
Dim cbar As CommandBar<br />
Dim cbutton As CommandBarButton</p>
<p>For Each cbar In Application.CommandBars<br />
    With cbar<br />
        If .Type = msoBarTypePopup Then<br />
            Set cbutton = .Controls.Add(temporary:=True)<br />
            With cbutton<br />
                .Caption = &#8220;Show popup info&#8221;<br />
                .Style = msoButtonIconAndCaption<br />
                .FaceId = 284<br />
                .OnAction = &#8220;show_popup_info&#8221;<br />
            End With<br />
        End If<br />
    End With<br />
Next cbar</p>
<p>End Sub</p>
<p>Sub show_popup_info()<br />
Dim i As Integer</p>
<p>With CommandBars.ActionControl.Parent<br />
    Debug.Print &#8220;Menu = &#8221; &amp; .Name &amp; String(7, &#8221; &#8220;) &amp; &#8220;Index = &#8221; &amp; .Index &amp; vbLf<br />
    Debug.Print &#8220;Caption&#8221; &amp; String(17, &#8221; &#8220;) &amp; &#8220;ID&#8221;<br />
    For i = 1 To .Controls.Count &#8211; 1<br />
        With .Controls(i)<br />
            Debug.Print &#8221; &#8221; &amp; .Caption &amp; String(22 &#8211; Len(.Caption), &#8221; &#8220;) &amp; .ID<br />
        End With<br />
    Next i<br />
End With<br />
Debug.Print vbLf</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
</channel>
</rss>

