Consulting

Results 1 to 7 of 7

Thread: Display label results in a texbox

  1. #1

    Display label results in a texbox

    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

  2. #2
    VBAX Expert Tinbendr's Avatar
    Joined
    Jun 2005
    Location
    North Central Mississippi (The Pines)
    Posts
    993
    Location
    Move the event into the Textbox1 Event.

    [VBA]Private Sub TextBox1_Change()
    Label2.Caption = TextBox1
    TextBox2.Text = Label2.Caption
    End Sub[/VBA]

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

    David


  3. #3
    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

  4. #4
    does anyone have a solution?? thanks

  5. #5

  6. #6
    VBAX Expert Tinbendr's Avatar
    Joined
    Jun 2005
    Location
    North Central Mississippi (The Pines)
    Posts
    993
    Location
    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.
    Last edited by Tinbendr; 07-15-2010 at 09:54 AM.

    David


  7. #7
    got it..thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •