View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andybro Andybro is offline
external usenet poster
 
Posts: 5
Default A negative to using Application.Onkey

I have programmed an excel spreadsheet to activate a macro when the ENTER
button is pressed using the Application.Onkey command.

My problem is that if I then open another excel spreadsheet, and I press
ENTER, then the macro for the 1st speadsheet tries to run.

Is there a way to ensure that this macro runs only in the specific
speadsheet and not in every speadsheet I have open?

NB/ I have currently written the onkey command into Sheet1 of Microsoft
Excel Objects for the speadsheet.

Thanks