Google should provide me with many examples, but none of them work.
What I want: Each time the user presses and then releases the ENTER key, my program does something (i.e. creates an MsgBox or a call function Foo). I would prefer this in the form of MWE
What I did: I tried using it, but none of the examples work. They compile but do nothing. I also saved in macro compatible Excel format.
What I use: I use Excel 2016, 64 bit with Office 365
EDIT: The user enters this information into the worksheet. I want to intercept user input, and each time they press ENTER, move the cursor / active cell two lines, so there is an empty cell under each cell. If the user clicks on the tab, I want to take the cursor / active cell to the right two columns, so there is an empty cell to the right of each cell.
EDIT 2: here is the MWE of what I have right now that should work, but that does nothing. I am adding this to a worksheet, not as a module
Sub SomeActions() MsgBox ("Hello") End Sub Private Sub Workbook_Open() Application.OnKey "~", "SomeActions" End Sub
source share