Text box last entry

A

art

Hello:

How can I make that a textbox in a userform should remember the users entry
even when it was unloaded already?

Thanks
Art
 
M

Mike H

Hi,

You could capture the value when the iserform closes and store it and then
re-load the value when the userform next loads.

Private Sub UserForm_Activate()
TextBox1.Text = Sheets("Sheet1").Range("A1").Value
End Sub

Private Sub UserForm_Terminate()
Sheets("Sheet1").Range("A1").Value = TextBox1.Text
End Sub

Mike
 
Top