I am trying to write a code using the Onkey for F1.
What I want to do is when the F1 key is pressed it will automatically add the text in textbox602 to the active or selected text box on a user form. Is it possible?


Private Sub UserForm_Initialize()
Application.OnKey "{F1}", "CH16a"
End sub


Sub CH16a()
Active.TextBox.Value = Active.TextBox.Value & vbNewLine & TextBox602.Value
End Sub