View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Torben Laursen[_2_] Torben Laursen[_2_] is offline
external usenet poster
 
Posts: 14
Default How do I know if user is pressing a key from the CommandBarButton class

I have a custom menu in Excel written in C#

Now I would like to check if a user is holding down the shift key when he is
clicking on one of my menu's.
I want to use this for hidden advanced features.
The function looks like this:
private void MI_EditUsingDatabase(CommandBarButton Ctrl, ref Boolean
CancelDefault)
{
bla bla
}

But how do I know if the user is pressing a key inside this function?

Torben