+ Reply to Thread
Results 1 to 8 of 8

Enterring data in Textbox then clicking on commandbutton to transfer data to each row

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Smile Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    To all,

    Please do me a favor!
    I've been tried to make a list of data that is enterred in the Textbox and when I click on Commandbutton all data will be stored in each row. For example:

    In Sheet1: I have created one Textbox1 and one Commandbutton1 in the sheet and when I enter data such as Green, Red, Blue in the Textbox1 and click on Commandbutton1, the data will be stored in cell A1 as "Green", A2 as "Red", and A3 as "Blue"

    To Clarify: First I enter "Green" in Texbox1, when click Commandbutton1 => "Green" will be stored in cell A1
    Second I enter "Red" in Texbox1, when click Commandbutton1 => "Red" will be stored in the next cell which is A2
    Third I enter "Blue" in Texbox1, when click Commandbutton1 => "Blue" will be stored in the next cell which is A3
    I want the range of the list from A1 to A500

    If you have any questions please feel free to let me know

    Thanks in advance.
    Vee

  2. #2
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    vbaAddtoList.xlsm

    This does what you requested ...
    Ted
    "Live Long and Prosper"

  3. #3
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    Hi tkowal,

    I posted reply to you yesterday but it didn't seem through.
    Thansks so much! your formula is great!

    So, next question is: if I want to add more Textbox but instead of using textbox I want to use 5 comboboxes and only one commandbutton, how can I click and store the data into A1, B1, C1, D1, and E1 according to Combobox1,2,3..5? and enter the second data will be stored A2, B2, C2, D2,and E2?

    Thanks and appreciate your advice,
    Verasak

  4. #4
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    Is there any body can help me with this?

    Thanks!!

  5. #5
    Registered User
    Join Date
    04-27-2012
    Location
    New York, USA
    MS-Off Ver
    Excel 2010
    Posts
    63

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    Try this:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    Hi cschoyer,

    Thanks so much, it works!

    Would you help for the next requests?

    After creating the List by using 5 combobuttons so next; if I have already entered the data into each commbobox then click to send data into List in row 1, 2, 3....in oreder, such as

    row 1 => column A, B, C, D, E = 1, 1, 1, 1, 1 in order
    row 2 => column A, B, C, D, E = 2, 2, 2, 2, 2 in order
    row 3 => column A, B, C, D, E = a, b, c, d, e in order
    row 4 => column A, B, C, D, E = q, q, q, q, q in order

    The next requests are:

    1. If I just found that the data in row 2 => 2, 2, 2, 2, 2 are incorrect I want to delete row 2 off the List, so I want to create the
    commandbutton2 to delete all data in row 2 and I need the row 3 and row 4 move up to row 2 and row 3 accordingly,
    so when I enter the new data as 7, 7, 7, 7, 7 all data will appear in the List as following:

    row 1 => column A, B, C, D, E = 1, 1, 1, 1, 1 in order
    row 2 => column A, B, C, D, E = a, b, c, d, e in order
    row 3 => column A, B, C, D, E = q, q, q, q, q in order
    row 4 => column A, B, C, D, E = 7, 7, 7, 7, 7 in order

    FYI: the reason why I really need this function because I wil lock all cells in the List and not allow anybody to edit contents in it, except they
    can only use the commandbutton2 to delete the wrong data in specific row such as row 2 mentioned above.

    2. After entering many data in each row into the List, the List may not organize properly, so I would like to create the commandbutton3 to
    sort the data by numerical or alphabetical refer to column A.


    If you have any questions or comments please feel free to let me know.

    I do really appreciate your advices.

    Regards,
    Verasak

    ========================================================================

  7. #7
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    To all,

    Is there anybody could help on this:

    1. I have created Textbox and link with cell K20 by using this macro;

    Private Sub TextBox1_Change()
    TextBox1.Text = Cells(20, 11).Text
    End Sub

    I would like everytimes when content in cell K20 is changed the content in Textbox1 will be changed automatically following cell K20.
    The problem is; when content in cell K20 is changed, I have to put cursor in Textbox1 and then press on Tab then the content just changed
    following cell K20.
    Do you have anyways when the content in cell K20 is changed then the content in Textbox1 will be changed right the way by do not have to
    press Tab in the Textbox1?

    2. If I have one commandbutton1 in Sheet1 and want this commandbutton1 click to activate to Textbox or Label which lacated in the different
    sheets in the same workbook such as Sheet2, how can I do?

    Thanks in advace!!

    Verasak

  8. #8
    Registered User
    Join Date
    05-09-2012
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Enterring data in Textbox then clicking on commandbutton to transfer data to each row

    Hi All,

    Follwing the codes below, if I have these commboBoxes in Sheet1 and want to send the data into the List which lacated in Sheet2, please advise how to do this.


    Private Sub CommandButton1_Click()

    nextrow = Worksheets("Sheet1").Range("A65536").End(xlUp).Row + 1

    Cells(nextrow, 1) = ComboBox1.Text
    Cells(nextrow, 2) = ComboBox2.Text
    Cells(nextrow, 3) = ComboBox3.Text
    Cells(nextrow, 4) = ComboBox4.Text
    Cells(nextrow, 5) = ComboBox5.Text

    End Sub

+ Reply to Thread

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