Search code examples
excelvbauserform

Userform keeps clearing values when reopened


How do I keep the values that where inputted into the excel Userform from clearing itself out once I click on the finish button? So whenever I call upon the Userform through a Commandbutton the previously filled field information is left the way it is and not to be cleared basically.

This Userform consist of MultiPage which is designed to take in the inputs from the user and place them in excel cells once the user has hit the finish button. Within the Userform contains Commandbuttons which toggles an hide/unhide feature which will also have to be saved somewhere

The Finish page (where the user will close/exit the page) looks like this: enter image description here

Code for the finish button so far:

enter image description here


Solution

  • I'm not sure why everyone is saying there is no way to do this - you should be able to use:

    Private Sub BtnFinish_Click()
        Me.Hide
    End Sub
    

    And all previous values will be kept. Someone correct me if I'm wrong :).

    I should add that once the EXCEL.EXE is closed, the values are lost.