PDA

View Full Version : Saving information from the user form



cal911
04-07-2015, 05:51 PM
Hi guys,

I have a user form with lots of textboxes that gather the user inputs. When the user presses cmdOK it closes the current userform and populates the next one. On the next form I have a "back" button which unloads the current form and shows the previous one. However, the previous form comes up empty... Is there a way to save the information entered on the previous form so that when the user chooses to go back its pre-populated? Your advise is much appreciated!

Wizwyrm
04-07-2015, 09:05 PM
Hi cal911.
You can use userform.hide when closing first userform(unload it later) or dump textbox values to public variables or cells.

cal911
04-07-2015, 09:48 PM
Hi cal911.
You can use userform.hide when closing first userform(unload it later) or dump textbox values to public variables or cells.

Can you please elaborate? I have 6 consecutive forms each feeding the info into the next one and I put back buttons on each one of them...

mancubus
04-08-2015, 02:33 AM
in cmdOK buttons' click events use;
UserFormX.Hide rather than Unload UserFormX

in cmdBACK buttons' click events use;
UserFormX.Show rather than Load UserFormX



Private Sub cmdOK_Click()
Me.Hide
UserFormNext.Show
End Sub

Private Sub cmdBACK_Click()
Me.Hide
UserFormPrevious.Show
End Sub