Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Undo button in the context menu (right click menu)

I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.

Regards,
Madiya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Undo button in the context menu (right click menu)

hi Madiya

Try this

With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
End With


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Madiya" wrote in message ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.

Regards,
Madiya

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Undo button in the context menu (right click menu)

128 is the id for undo button. Hope that helps

Sub BtnInRightClick()
Application.CommandBars("cell").Controls.Add , 128
End Sub
--
Regards,
Anant


"Madiya" wrote:

I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.

Regards,
Madiya

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Undo button in the context menu (right click menu)

On Mar 24, 6:28*pm, "Ron de Bruin" wrote:
hi Madiya

Try this

* * With Application.CommandBars("Cell")
* * * * .Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
* * End With

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Madiya" wrote in ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Hi Ron,
Its great. Exactly what I want. Thank you.

However, for purpose of learning, I would like to know how to fig it
out?
Say if next time I want redo or sort asc or autosum or format painter?

I would like to do it myself as far as possible.

Pl let me know if possible.

Regards,
Madiya.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Undo button in the context menu (right click menu)

Hi Madiya

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

Use the add-in to find the Id numbers

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Madiya" wrote in message ...
On Mar 24, 6:28 pm, "Ron de Bruin" wrote:
hi Madiya

Try this

With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
End With

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Madiya" wrote in ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Hi Ron,
Its great. Exactly what I want. Thank you.

However, for purpose of learning, I would like to know how to fig it
out?
Say if next time I want redo or sort asc or autosum or format painter?

I would like to do it myself as far as possible.

Pl let me know if possible.

Regards,
Madiya.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Undo button in the context menu (right click menu)

On Mar 24, 6:59*pm, "Ron de Bruin" wrote:
Hi Madiya

Seehttp://www.rondebruin.nl/menuid.htm#Screenshots

Use the add-in to find the Id numbers

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Madiya" wrote in ...

On Mar 24, 6:28 pm, "Ron de Bruin" wrote:





hi Madiya


Try this


With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
End With


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Madiya" wrote in ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Hi Ron,
Its great. Exactly what I want. Thank you.

However, for purpose of learning, I would like to know how to fig it
out?
Say if next time I want redo or sort asc or autosum or format painter?

I would like to do it myself as far as possible.

Pl let me know if possible.

Regards,
Madiya.- Hide quoted text -

- Show quoted text -


Thank you Ron.
Anant,
Thanks.

Regards,
Madiya
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default Undo button in the context menu (right click menu)

On Mar 24, 7:50*pm, Madiya wrote:
On Mar 24, 6:59*pm, "Ron de Bruin" wrote:





Hi Madiya


Seehttp://www.rondebruin.nl/menuid.htm#Screenshots


Use the add-in to find the Id numbers


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Madiya" wrote in ...


On Mar 24, 6:28 pm, "Ron de Bruin" wrote:


hi Madiya


Try this


With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
End With


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Madiya" wrote in ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Hi Ron,
Its great. Exactly what I want. Thank you.


However, for purpose of learning, I would like to know how to fig it
out?
Say if next time I want redo or sort asc or autosum or format painter?


I would like to do it myself as far as possible.


Pl let me know if possible.


Regards,
Madiya.- Hide quoted text -


- Show quoted text -


Thank you Ron.
Anant,
Thanks.

Regards,
Madiya- Hide quoted text -

- Show quoted text -


Hi Ron,
I have tried to add other buttons like save whose id is 3 but i am
getting following error.
Automation error
Unspecifies error
Both the errors are shown on the same error message.
Whats wrong? pl help.

Regards,
Madiya
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Undo button in the context menu (right click menu)

See that I use
msoControlSplitDropdown

Look in the add-in for the correct name

You must use

With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlButton, ID:=3, befo=1, temporary:=True
End With


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Madiya" wrote in message ...
On Mar 24, 7:50 pm, Madiya wrote:
On Mar 24, 6:59 pm, "Ron de Bruin" wrote:





Hi Madiya


Seehttp://www.rondebruin.nl/menuid.htm#Screenshots


Use the add-in to find the Id numbers


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Madiya" wrote in ...


On Mar 24, 6:28 pm, "Ron de Bruin" wrote:


hi Madiya


Try this


With Application.CommandBars("Cell")
.Controls.Add Type:=msoControlSplitDropdown, ID:=128, befo=1, temporary:=True
End With


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Madiya" wrote in ...
I have added some buttons for running my macro in the right click
context menu.
I want to add UNDO button also.
Pl help on how to proceed.


Regards,
Madiya- Hide quoted text -


- Show quoted text -


Hi Ron,
Its great. Exactly what I want. Thank you.


However, for purpose of learning, I would like to know how to fig it
out?
Say if next time I want redo or sort asc or autosum or format painter?


I would like to do it myself as far as possible.


Pl let me know if possible.


Regards,
Madiya.- Hide quoted text -


- Show quoted text -


Thank you Ron.
Anant,
Thanks.

Regards,
Madiya- Hide quoted text -

- Show quoted text -


Hi Ron,
I have tried to add other buttons like save whose id is 3 but i am
getting following error.
Automation error
Unspecifies error
Both the errors are shown on the same error message.
Whats wrong? pl help.

Regards,
Madiya
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
Custom Context menu (Right click menu) not working in sheet changeevent. Madiya Excel Programming 3 February 11th 08 01:24 PM
Right click Drag and Drop context menu Al_Raiani Excel Programming 0 June 28th 07 07:46 PM
Context Menu (Sub-Menu Disable/Enable) JR_06062005[_2_] Excel Programming 4 August 31st 06 06:01 PM
access [contextual||context||right-click] [menu||commandbar] of ch mrmack Excel Programming 0 June 21st 06 09:32 AM
Right-Click (Context Menu) Kryptonix Excel Programming 6 October 25th 05 03:59 PM


All times are GMT +1. The time now is 09:01 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"