PDA

View Full Version : Display label results in a texbox



av8tordude
07-14-2010, 01:10 PM
How do get the results of a label (Label2) on Multi-page 2 to automatically enter the display label2 results in a textbox on multi-page 1?

Thanks

Tinbendr
07-14-2010, 01:40 PM
Move the event into the Textbox1 Event.

Private Sub TextBox1_Change()
Label2.Caption = TextBox1
TextBox2.Text = Label2.Caption
End Sub

You could move it into the Multipage event.
Private Sub MultiPage1_Click(ByVal Index As Long)
TextBox2.Text = Label2.Caption
End SubBut why would you?

av8tordude
07-14-2010, 02:11 PM
Hi tin,

your code works, but i tried to adapt your code to my code, but doesn't work. I'm using a button to run calculation. The results are display in label2. I would label2 caption to dispaly in textbox2. I've updated the form to reflect this. Can you assist. thanks

av8tordude
07-14-2010, 06:31 PM
does anyone have a solution?? thanks

av8tordude
07-14-2010, 06:31 PM
bump

Tinbendr
07-15-2010, 05:33 AM
I think you are still confused about events.

Whatever object starts the action, you have to move the code to that event.

In your second, different userform, the code has to be moved to the commandbutton.

av8tordude
07-15-2010, 07:10 AM
got it..thank you:friends: