View Single Post
 
Old 03-29-2013, 04:14 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote