+ Reply to Thread
Results 1 to 7 of 7

Thread: Userform Hide and Save

  1. #1
    Registered User
    Join Date
    05-23-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    60

    Question Userform Hide and Save

    Hello,

    I created a "pause" button on my userform that allows the user to temporarily stop filling out the form and resume at a later time. The issue I am having is that when the user saves and closes the excel file, and reopens it, the data is lost on the userform.

    The pause button runs off of a userform.hide command, and works when the file remains open. Is there another way of managing this capability, while ensuring the patially completed userform saves the information until the user completes and submits the data?

    Thanks
    GSurge

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Userform Hide and Save

    You can't save a userform's input when the workbook is closed. The input must be saved to say a hidden sheet & retreived when re-opening
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    657

    Re: Userform Hide and Save

    Hi,

    When you close Excel it will clear the userform info. What you need to do is when you Click the "Pauses" button to have the info stored some where and then if you close Excel and reopen it you can have the form reload the info.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  4. #4
    Registered User
    Join Date
    05-23-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Userform Hide and Save

    Great. Can you please help me the code for that?

    Do you have an example of how the code should look? I am very new at VBA....

  5. #5
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    657

    Re: Userform Hide and Save

    Hi,

    The code would be similar to your code(if you have it) that when you want the data to be transferred from the form to the worksheet. The only difference is it will go to a hidden sheet.
    And when you re open Excel you will have the userform initialize (filed in) when the form is call up to be used.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  6. #6
    Registered User
    Join Date
    05-23-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Userform Hide and Save

    I understand the transfer to the hidden worksheet, but could you provide an example/further explanation of how to get the data back into the userform when the form is restarted after excel is opened?

  7. #7
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Userform Hide and Save

    Just reverse the code that posts to the sheet
    [me.textbox1.value= "cell that has value in it"[/code]
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0