View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cliff Ragsdale Cliff Ragsdale is offline
external usenet poster
 
Posts: 1
Default Trapping the Enter Icon

If you press F2 to edit a formula in the Formula Bar, a little green
check mark appears that you can click to 'Enter' the edited formula.

I am trying to trap the formula entry event using
Application.OnKey "~", "MySub"

This works fine as long as the user presses the Enter key to enter the
formula. It doesn't work if the user presses the green check mark.

Is there a way to trap the pressing of the green check mark using
OnKey?

Ordinarily, I'd use Workbook_SheetChange or a related event to trap
this. However, the application I'm writing will reside in a separate
workbook (add-in) from the workbook the user is actually editing. So
I can't assume or use any of the workbook/worksheets events in the
workbook being edited.