View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Adding items to a right click menu

Hi Kezza,

Hello all, is it possible to add "insert time" and "insert date" to the
right click popup menu? I am trying to get away from keyboard
shortcuts.


Ron de Bruin has sample code for adding (or removing) commands to the
right-click menu at:

http://www.rondebruin.com/menuid.htm#Add

See particularly Ron's Add_Controls procedure on that page.

In your case, the macros to be added to the menu might be:

'=============
Public Sub InsertDate()
Selection.Value = Date
End Sub

'-----------------

Public Sub InsertTime()
Selection.Value = Time
End Sub
'<<=============


---
Regards,
Norman