View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default text boxes retaining their last value on form close and restart

It sounds like you've assigned a cell to the ControlSource property for the
textboxes.

You may find it easier to drop that technique and use the OK button to update
the cells with the values from the textboxes.

And you can use the _initialize procedure to populate the textboxes with the
values from the cells:

Option Explicit
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Worksheets("Sheet1").Range("A1").Text
End Sub



NDBC wrote:

In my user form there are 5 text boxes. Rider1 through Rider5. Is there a way
to store the values of these text boxes so the last values come up as the
starting values if the user accidently closes down the form (x in top right)
and then clicks the button to restart it.

Thanks


--

Dave Peterson