+ Reply to Thread
Results 1 to 3 of 3

Forced Tab event on close or save UserForm

  1. #1
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Forced Tab event on close or save UserForm

    G'Day Folks,

    What I experience with UserForms I have created, that a failure mode occures and that is when users close or save the UserForm the last entry is not moved over from the form to the worksheet cell. This is simply because I operate with .ControlSource property and it requires to either click on another textbox, or to hit the Tab key in order the entries are transferred to the respective cell of the worksheet. And this is what users do not do, they just close the form.
    So what I am now asking for is a line maybe in the UserForm_QueryClose sub that is actually an event of like hitting the Tab key.
    Hope that is clear enough.

    Thanks

    Gabor

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by Gabor
    G'Day Folks,

    What I experience with UserForms I have created, that a failure mode occures and that is when users close or save the UserForm the last entry is not moved over from the form to the worksheet cell. This is simply because I operate with .ControlSource property and it requires to either click on another textbox, or to hit the Tab key in order the entries are transferred to the respective cell of the worksheet. And this is what users do not do, they just close the form.
    So what I am now asking for is a line maybe in the UserForm_QueryClose sub that is actually an event of like hitting the Tab key.
    Hope that is clear enough.

    Thanks

    Gabor
    Have you a (OK)command button that will perform the action?

  3. #3
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226
    There are 4 commandbuttons on the form: Close, Print, Save and Create New.
    All are to have that functionality to tab out of the last active control.
    Also, the user can hit the x in the upper right corner. That is the why I thought one magic line in the private sub UserForm_QueryClose would do it all.
    An OK button I do not have.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1