Calling Richie(UK)

sykes

Well-known Member
Joined
May 1, 2002
Messages
1,885
Office Version
  1. 365
Platform
  1. Windows
Hi Richie
I read with much interest your ditty on the toolbars job, and making a new entry in the mouse right click drop down menu.Muchus interetii.
However, I can't see from where you found that the reference to the mouse menu was:
"With Application.CommandBars("Cell")"

Would you be kind enough to enlighten one?


Many thanks, in anticipation


Kindest


Sykes
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Run this code to get some details about the commandbars....you will see a reference to Cell...have a look..

<PRE><FONT color=blue>Sub </FONT>ListCommandbars()

<FONT color=blue>Dim </FONT>cbar <FONT color=blue>As</FONT> CommandBar, x

<FONT color=blue>On Error</FONT> <FONT color=blue>Resume </FONT><FONT color=blue>Next</FONT>

Application.ScreenUpdating =<FONT color=blue> False</FONT>

<FONT color=blue>Range</FONT>("A2:J2").End(xlDown).Delete

<FONT color=blue>On Error</FONT> <FONT color=blue>Resume </FONT><FONT color=blue>Next</FONT>

x = 2

<FONT color=blue>For </FONT>Each cbar In CommandBars

Cells(x, 1) = cbar.Name

Cells(x, 2) = cbar.accRole <FONT color=#339966>'.accKeyboardShortcut 'works
</FONT>
Cells(x, 3) = cbar.accDescription

Cells(x, 4) = cbar.accChildCount

Cells(x, 5) = cbar.InstanceId

Cells(x, 6) = cbar.Parent

Cells(x, 7) = cbar.Type

Cells(x, :cool: = cbar.accState

Cells(x, 9) = cbar.Visible

Cells(x, 10) = cbar.NameLocal

x = x + 1

<FONT color=blue>Next</FONT>

Application.ScreenUpdating =<FONT color=blue> True</FONT>

<FONT color=blue>Range</FONT>(<FONT color=blue>Range</FONT>("A2"), <FONT color=blue>Range</FONT>("J2").End(xlDown)).Sort [A2], xl<FONT color=blue>As</FONT>cending



<FONT color=blue>End Sub</FONT>


</PRE>
 
Upvote 0
Ivan.

Gosh!!

Many thanks, as always

regards

Sykes
 
Upvote 0
Sykes - glad you liked it. :) It gives me the confidence to experiment with other people's toolbar macros and know that if its badly written I can still quickly and easily recover the missing menus.


Ivan - thanks for stepping in during my absence. Very similar to the code example I would have provided (which, as a beginner, makes me feel very happy!) :biggrin:
 
Upvote 0
Hi again chaps
Don't know if you're still here on this one (seems a long time ago now) but one question was, that I still can't actually see a reference to the mouse control when I get the table up from having run the code.
I can see the references to "cell" and the numbers various etc etc but what actually tells me that the cell reference (and there are actually 2 or 3 of them) refers to the mouse control itself?

Ta

Sykes
 
Upvote 0
Hi Sykes,

What we are looking at here is a menu item of the type, msoBarTypePopup.

Among these are the common shortcut commands that are typically obtained by clicking the right mouse button. The Cell menu corresponds to the shortcut options available when you right click in a worksheet cell.

Being a beginner myself I don't really know how to explain it any better than that. Perhaps Ivan or somebody else will have more to add.

HTH
 
Upvote 0
Hi Richie

Thanks for the reply, however;

No, me beginner, you Excel clever person.

Keep up the good work.

Sykes
 
Upvote 0

Forum statistics

Threads
1,206,971
Messages
6,075,922
Members
446,170
Latest member
zzzz02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top