PC Review


Reply
Thread Tools Rate Thread

Custom Right Click

 
 
Steven
Guest
Posts: n/a
 
      25th Jun 2008
I thought 1589 below was Insert Comment. The others show on the right click
but not the Insert Comment?

Thank you,

Steven

Sub RemoveRightClick()
Dim IDnum As Variant
Dim N As Integer
Dim Ctl As CommandBarControl

'Set Enabled to False for all the controls
For Each Ctl In CommandBars("Cell").Controls
On Error Resume Next
Ctl.Enabled = False
Ctl.Visible = False
On Error GoTo 0
Next Ctl

'Now set Enabled to True for the controls you want
IDnum = Array("19", "21", "22", "755", "1589")
For N = LBound(IDnum) To UBound(IDnum)
On Error Resume Next
Application.CommandBars("Cell").FindControl(ID:=IDnum(N),
Recursive:=True).Enabled = True
Application.CommandBars("Cell").FindControl(ID:=IDnum(N),
Recursive:=True).Visible = True
On Error GoTo 0
Next N
End Sub

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      25th Jun 2008
It's 2031 according to my Excel.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Steven" <(E-Mail Removed)> wrote in message
news:99A7EA5F-D54E-43AF-B870-(E-Mail Removed)...
>I thought 1589 below was Insert Comment. The others show on the right
>click
> but not the Insert Comment?
>
> Thank you,
>
> Steven
>
> Sub RemoveRightClick()
> Dim IDnum As Variant
> Dim N As Integer
> Dim Ctl As CommandBarControl
>
> 'Set Enabled to False for all the controls
> For Each Ctl In CommandBars("Cell").Controls
> On Error Resume Next
> Ctl.Enabled = False
> Ctl.Visible = False
> On Error GoTo 0
> Next Ctl
>
> 'Now set Enabled to True for the controls you want
> IDnum = Array("19", "21", "22", "755", "1589")
> For N = LBound(IDnum) To UBound(IDnum)
> On Error Resume Next
> Application.CommandBars("Cell").FindControl(ID:=IDnum(N),
> Recursive:=True).Enabled = True
> Application.CommandBars("Cell").FindControl(ID:=IDnum(N),
> Recursive:=True).Visible = True
> On Error GoTo 0
> Next N
> End Sub
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Right Click--VBA? dgold82 Microsoft Excel Programming 4 4th Jun 2009 01:41 PM
Custom animation w/out need to click?? =?Utf-8?B?SmFrZQ==?= Microsoft Powerpoint 2 2nd May 2006 06:42 PM
MSG Custom properties on right click custom tab stephaniedunsire@hotmail.com Microsoft Outlook Program Addins 1 1st Feb 2006 06:00 PM
MSG Custom properties on right click custom tab Steph Microsoft Outlook VBA Programming 1 1st Feb 2006 05:55 PM
custom right click menu =?Utf-8?B?RmF0aGVyIG9mIDc=?= Microsoft Excel Programming 1 27th Jan 2005 01:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 AM.