Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to right-click menu


Hi.

I have written a short macro to add items to the right-click menu, bu
am having difficulty finding the right ID numbers. So far, I hav
managed to add "Paste Values" and "Paste Formatting", as below:

Sub AddItems()

'Paste Values
Application.CommandBars("cell").Controls.Add Type:=msoControlButton
ID:=370, befo=5

'Paste Formatting
Application.CommandBars("cell").Controls.Add Type:=msoControlButton
ID:=369, befo=5

End Sub

I also want to add the following:


- Paste Formulas
- Paste Comments


But I don't know the relevant ID numbers! Please can anyone tell m
what they are?

Thanks

--
Cumberlan
-----------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...fo&userid=3344
View this thread: http://www.excelforum.com/showthread.php?threadid=57171

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to right-click menu


Maybe this link will help with the ID's

Regards,
Simon

http://support.microsoft.com/?kbid=830502


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571718

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to right-click menu


The last link may be useful but this one has all the ID's for exce
2000

Regards,
Simon

http://support.microsoft.com/kb/213552/EN-US

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=57171

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to right-click menu


Thanks Simon, much appreciated, but unfortunately they haven't answered
my question.

You'll notice that the ID numbers I already have, 369 and 370, aren't
actually listed in the ID numbers link, so what I really need are
absolutely EVERY single ID number possible and what they do. I've had a
scan around Microsoft's website, but they aren't there.

I could try going through every ID in the macro until I find the right
ones, but that could take a LONG time!!!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...o&userid=33445
View this thread: http://www.excelforum.com/showthread...hreadid=571718

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to right-click menu


Sorry thats the best i could do, perhaps send mail to microsoft and
ask?

Worth a go!

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=571718



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Adding items to right-click menu

You don't need any ID's to add to the right-click menu:

With Application.CommandBars("Cell")
With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Change text to numbers in selected sheet range"
.OnAction = "MakeNumbers"
.FaceId = 399
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Change formula's to values"
.OnAction = "FormulasToValues"
.FaceId = 385
End With
End With

etc.

RBS


"Cumberland" wrote
in message ...

Hi.

I have written a short macro to add items to the right-click menu, but
am having difficulty finding the right ID numbers. So far, I have
managed to add "Paste Values" and "Paste Formatting", as below:

Sub AddItems()

'Paste Values
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=370, befo=5

'Paste Formatting
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=369, befo=5

End Sub

I also want to add the following:


- Paste Formulas
- Paste Comments


But I don't know the relevant ID numbers! Please can anyone tell me
what they are?

Thanks!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile:
http://www.excelforum.com/member.php...o&userid=33445
View this thread: http://www.excelforum.com/showthread...hreadid=571718


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Adding items to right-click menu

Sorry, ignore this message. I realize you are dealing with built-in actions
where this is different.
Still, maybe you could make macro's that do these built-in actions and do it
as posted.

RBS

"RB Smissaert" wrote in message
...
You don't need any ID's to add to the right-click menu:

With Application.CommandBars("Cell")
With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Change text to numbers in selected sheet range"
.OnAction = "MakeNumbers"
.FaceId = 399
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Change formula's to values"
.OnAction = "FormulasToValues"
.FaceId = 385
End With
End With

etc.

RBS


"Cumberland"
wrote in message
...

Hi.

I have written a short macro to add items to the right-click menu, but
am having difficulty finding the right ID numbers. So far, I have
managed to add "Paste Values" and "Paste Formatting", as below:

Sub AddItems()

'Paste Values
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=370, befo=5

'Paste Formatting
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=369, befo=5

End Sub

I also want to add the following:


- Paste Formulas
- Paste Comments


But I don't know the relevant ID numbers! Please can anyone tell me
what they are?

Thanks!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile:
http://www.excelforum.com/member.php...o&userid=33445
View this thread:
http://www.excelforum.com/showthread...hreadid=571718



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Adding items to right-click menu

You can generate all the data yourself. depending exactly what you need,
something aloong these lines:
Private Sub CommandButton1_Click()
Dim cmdBar As CommandBar
Dim cmdBarCtrl As CommandBarControl

For Each cmdBar In CommandBars
Debug.Print cmdBar.Index, cmdBar.Name
For Each cmdBarCtrl In cmdBar.Controls
Debug.Print , cmdBarCtrl.ID, cmdBarCtrl.Caption
Next
Next
End Sub

NickHK

"Cumberland" ¼¶¼g©ó¶l¥ó·s»D:Cumberland.2ckwrq_1155641109.3903@e xcelforum-nospam.com...

Thanks Simon, much appreciated, but unfortunately they haven't answered
my question.

You'll notice that the ID numbers I already have, 369 and 370, aren't
actually listed in the ID numbers link, so what I really need are
absolutely EVERY single ID number possible and what they do. I've had a
scan around Microsoft's website, but they aren't there.

I could try going through every ID in the macro until I find the right
ones, but that could take a LONG time!!!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile:
http://www.excelforum.com/member.php...o&userid=33445
View this thread: http://www.excelforum.com/showthread...hreadid=571718



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Adding items to right-click menu

See
http://www.rondebruin.nl/menuid.htm

Read this part about the ID's
http://www.rondebruin.nl/menuid.htm#ID


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



"Cumberland" wrote in message
...

Hi.

I have written a short macro to add items to the right-click menu, but
am having difficulty finding the right ID numbers. So far, I have
managed to add "Paste Values" and "Paste Formatting", as below:

Sub AddItems()

'Paste Values
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=370, befo=5

'Paste Formatting
Application.CommandBars("cell").Controls.Add Type:=msoControlButton,
ID:=369, befo=5

End Sub

I also want to add the following:


- Paste Formulas
- Paste Comments


But I don't know the relevant ID numbers! Please can anyone tell me
what they are?

Thanks!


--
Cumberland
------------------------------------------------------------------------
Cumberland's Profile: http://www.excelforum.com/member.php...o&userid=33445
View this thread: http://www.excelforum.com/showthread...hreadid=571718



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
Adding items to a right click menu Kezza Excel Programming 3 May 21st 06 09:53 AM
Items Added to Right-Click Menu Only Visible From Some Sheets Carroll[_2_] Excel Programming 0 August 18th 05 02:02 PM
Right-Click Menu Items -- Duplicate Entries Carroll[_2_] Excel Programming 3 May 18th 05 09:23 PM
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 02:54 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"