ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Invoke a macro with the Enter key (https://www.excelbanter.com/excel-programming/320417-invoke-macro-enter-key.html)

Duncan Help

Invoke a macro with the Enter key
 
I would like to invoke a little macro that puts a time stamp in the cell on
the right, then moves down one cell. I know how to make the macro, I just
don't know how to attach it to the Enter key.

AA2e72E

Invoke a macro with the Enter key
 
Are you sure about assigning this macro to the Enter key?

It is simple:

application.OnKey "{~}", "Your Macro"
application.OnKey "{ENTER}", "Your Macro"

There are 2 enter keys. Check the help topic OnKey.

"Duncan Help" wrote:

I would like to invoke a little macro that puts a time stamp in the cell on
the right, then moves down one cell. I know how to make the macro, I just
don't know how to attach it to the Enter key.


Dave Peterson[_5_]

Invoke a macro with the Enter key
 
As an alternative, you may want to look at how JE McGimpsey does it based on a
cell changing:
http://www.mcgimpsey.com/excel/timestamp.html



Duncan Help wrote:

I would like to invoke a little macro that puts a time stamp in the cell on
the right, then moves down one cell. I know how to make the macro, I just
don't know how to attach it to the Enter key.


--

Dave Peterson


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com