Worksheet update from UserForm

  • Thread starter Thread starter Patrick Simonds
  • Start date Start date
P

Patrick Simonds

I have a userform which has a number of lines like the ones below. Currently
these values are placed on the worksheet after I click a commandbutton
(finished). What I would like is for the data to be placed on the worksheet
as I move from one textbox to the next. Is this possible?


rng(1, 47).Value = TextBox1.Text
rng(1, 48).Value = TextBox2.Text
rng(1, 53).Value = TextBox4.Text
rng(1, 54).Value = TextBox5.Text
rng(1, 71).Value = TextBox7.Text
rng(1, 59).Value = TextBox8.Text
rng(1, 60).Value = TextBox9.Text
 
Yes. Just put the code in the Exit event of the TextBox.

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Sheet1.Cells(1, 47).Value = TextBox1.Text
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top