Results 1 to 8 of 8

userform: trasnferring textbox value to label field in next userform

Threaded View

  1. #1
    Registered User
    Join Date
    05-03-2008
    Posts
    24

    userform: trasnferring textbox value to label field in next userform

    Hello

    I am creating a userform with a series of steps and command buttons. I want users to enter text for an ID # in the first pop-up (UserForm2). When they click NEXT (CommandButton1), I want the text/ID#(TextBox1, TextBox2,...TextBox6) to transfer into a label field (Label10,Label11,...Label15) in the next pop-up(UserForm1).

    I have also written code for the TextBox values to populate in a database worksheet so that I can refer to those values later.

    Can I write the code to transfer the text to the label in the same macro for CommandButton1?

    Here is the code for clicking NEXT(CommandButton1):
    Private Sub CommandButton1_Click()
    Worksheets("Sheet2").Range("A2") = UserForm2.TextBox1.Value
    Worksheets("Sheet2").Range("A3") = UserForm2.TextBox2.Value
    Worksheets("Sheet2").Range("A4") = UserForm2.TextBox3.Value
    Worksheets("Sheet2").Range("A5") = UserForm2.TextBox4.Value
    Worksheets("Sheet2").Range("A6") = UserForm2.TextBox5.Value
    Worksheets("Sheet2").Range("A7") = UserForm2.TextBox6.Value
    
    UserForm2.Hide
    UserForm1.Show
    End Sub
    Last edited by Leith Ross; 07-17-2008 at 01:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1