Alex,
With your code (either of them) I don't see how you have returned the focus to the document. In fact the KeyDown would only work if the Userform had the focus. If that is acceptable, then perhaps:
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Selection.TypeText Chr(KeyAscii)
Unload Me
End Sub
How are you triggering the display of your userform?
|