I'd like to have Excel change to a predefined data in any cell in column A whenever the user hits the Enter key (instead of the default go to next cell behavior). How can I achieve this in VBA?
1 Answer
Try do it in Workbook_open event
Private Sub Workbook_Open() Application.OnKey "{ENTER}", "MyEnterEvent"
End Sub
Sub MyEnterEvent ' codes here
End SubTo end Macro
Application.OnKey "{ENTER}" 3