+ Reply to Thread
Results 1 to 6 of 6

How do I keep the Excel UserForm from clearing when user Presses Done

  1. #1
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    How do I keep the Excel UserForm from clearing when user Presses Done

    As I have tested my UserForm during its creation, I have noticed that when I press done and all of my contents are entered into the Excel worksheet and then re-open the UserForm it's blank! I don't want that. I want it to keep the information. How do I tell it to do that?

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: How do I keep the Excel UserForm from clearing when user Presses Done

    use
    Me.Hide
    or
    Userform1.hide

    this will hide your form with all its data
    and when you call Me.show
    it should all be there

  3. #3
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: How do I keep the Excel UserForm from clearing when user Presses Done

    That sounds great. Thank you. Can you tell me where in the form's cod that should go. Should that go under the "done" button or somewhere else?

  4. #4
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: How do I keep the Excel UserForm from clearing when user Presses Done

    If you want the form to hide after you have run the code from your "done" button, just add me.hide as the last part of the code.

  5. #5
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: How do I keep the Excel UserForm from clearing when user Presses Done

    I think I figured it out. I placed "me.hide" just above all of the code for where the contents should be placed onto the excel worksheet upon pressing done. When I tested it, it seems to have worked. Thanky ou!

  6. #6
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: How do I keep the Excel UserForm from clearing when user Presses Done

    Thank you for your help!

+ 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