Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Right Click Menu


How do I add a Seperator Line?

The code I'm using is here.

http://www.ozgrid.com/VBA/right-click.htm


--
mpeplow
------------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812
View this thread: http://www.excelforum.com/showthread...hreadid=566667

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Right Click Menu

use the BeginGroup property.

--
Regards,
Tom Ogilvy


"mpeplow" wrote:


How do I add a Seperator Line?

The code I'm using is here.

http://www.ozgrid.com/VBA/right-click.htm


--
mpeplow
------------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812
View this thread: http://www.excelforum.com/showthread...hreadid=566667


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Right Click Menu

Hi

Use
BeginGroup = True

See example below to add two build-in controls to the cell menuu

Sub Add_Cell_Menu_Items()
Dim IDnum As Variant
Dim N As Integer

IDnum = Array("3", "4")
Application.CommandBars("Cell").Controls(1).BeginG roup = True

For N = LBound(IDnum) To UBound(IDnum)
On Error Resume Next
Application.CommandBars("Cell").Controls.Add _
Type:=msoControlButton, ID:=IDnum(N), befo=1
On Error GoTo 0
Next N
End Sub


Sub Delete_Cell_Menu_Items()
Dim IDnum As Variant
Dim N As Integer

IDnum = Array("3", "4")

For N = LBound(IDnum) To UBound(IDnum)
On Error Resume Next
Application.CommandBars("Cell").FindControl(ID:=ID num(N)).Delete
On Error GoTo 0
Next N
Application.CommandBars("Cell").Controls(1).BeginG roup = False

End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl



"mpeplow" wrote in message
...

How do I add a Seperator Line?

The code I'm using is here.

http://www.ozgrid.com/VBA/right-click.htm


--
mpeplow
------------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812
View this thread: http://www.excelforum.com/showthread...hreadid=566667



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add menu item to right-click menu [email protected] Excel Programming 1 July 15th 06 10:32 AM
Right click menu Mats.Bergstrand Excel Programming 0 December 17th 05 10:33 AM
right click menu PT SPORT CONTRUCTION CO.,LTD Excel Programming 2 October 13th 04 11:18 AM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Adding menu to the mouse right click pop-up menu Jack Excel Programming 1 February 12th 04 05:23 AM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"