How to unload the userform with the Enter key...
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: How to unload the userform with the Enter key...

  1. #1
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    On 2002-04-19 00:05, TsTom wrote:
    Is there a userform property to set?
    I placed a breakpoint in each event.
    Is there a property similiar to "KeyPreview" in VB for VBA userforms?
    They are not being fired.
    My goal is simple. Close the userform with the Enter key...
    Thanks,
    Tom

    [ This Message was edited by: TsTom on 2002-04-19 00:11 ]


    Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 13 Then Unload Me
    End Sub


    Kind Regards,
    Ivan F Moala From the City of Sails

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Ivan for the quick reply.
    That is the code I am using to the letter.
    For some reason or another the event will not fire at all?
    Could it be the host program?
    I am using VBA 6.0. Same as Office 2000.
    The host program is WRQ Reflection for Regis Graphics...
    Thanks Again...
    Tom

  3. #3
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-19 00:19, TsTom wrote:
    Thanks Ivan for the quick reply.
    That is the code I am using to the letter.
    For some reason or another the event will not fire at all?
    Could it be the host program?
    I am using VBA 6.0. Same as Office 2000.
    The host program is WRQ Reflection for Regis Graphics...
    Thanks Again...
    Tom
    Tom, worked for me in Excel2000.....??
    Kind Regards,
    Ivan F Moala From the City of Sails

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks Ivan...
    Must be the host program(Not Excel)
    Tom

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com