View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default UserForm Question

Enamored with repetitiveness you asked:
How would I modify if in textBox8 and TextBox9 the values 2 and 5
respectively for it to change textBox2 through textBox5, and not 6 and 7?


Private Sub TextBox1_Change()
With Me.TextBox1
TextBox2.Text = .Text
TextBox3.Text = .Text
TextBox4.Text = .Text
TextBox5.Text = .Text
' TextBox6.Text = .Text
' TextBox7.Text = .Text
TextBox8.Text = 2
TextBox9.Text = 5
End With
End Sub

However, using the exit event would be a better choice.

--
Regards,
Tom Ogilvy


"Sharon" wrote in message
...
Thanks Bob
A followup question:
How would I modify if in textBox8 and TextBox9 the values 2 and 5
respectively for it to change textBox2 through textBox5, and not 6 and 7?
Thanks!


"Bob Phillips" wrote:



Private Sub TextBox1_Change()
With Me.TextBox1
TextBox2.Text = .Text
TextBox3.Text = .Text
TextBox4.Text = .Text
TextBox5.Text = .Text
TextBox6.Text = .Text
TextBox7.Text = .Text
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sharon" wrote in message
...
Hello
I have a created a userform and would like the values in

txtBox3-txtBox10
to
default to the value in txtBox1 once it is entered. So if I enter 100

in
txtBox1 and then go to txtBox2 the values in 3-7 will be 100 also. I

am
new
to user forms and I dont know how to do this. All help would be

greatly
appreciated!
Thanks in advance
Sharon