Dear Forum members,
Recently I got this working piece of VBA code from this forum that remembers the data that a user has typed in the inputboxes on a userform so when the next userform opens the user doesn't have to type all information again.
This works great and is very usefull but I want to make a small change to this.
I made a checkbox in the userforms and now I want the data to be remembered only when the user has selected this checkbox
If the checkbox is not selected the data should not be remembered.
I tired to place the checkbox = true code on several places but it's just not working....
Can someone help me out
This is the working code that remembers the user's input
How and where should I add the code so the data is only remembered when checkbox1 is selected ??![]()
Private Sub CommandButton1_Click() Cells(Rows.Count, 1).End(xlUp).Offset(1) = TextBox1.Text End Sub Private Sub TextBox1_afterupdate() txtvalue = TextBox1.Text End Sub Private Sub UserForm_Initialize() TextBox1.Text = txtvalue End Sub
Bookmarks