Results 1 to 2 of 2

User Input to Next Row

Threaded View

roki4 User Input to Next Row 05-17-2012, 05:39 PM
roki4 Re: User Input to Next Row 05-17-2012, 07:29 PM
  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    User Input to Next Row

    Hi,

    I have this code to put the user input into row 5.

    Private Sub CommandButton1_Click()
    
    Worksheets("2012-2013").Range("A5").Value = UserForm1.TextBox1.Value
    Worksheets("2012-2013").Range("B5").Value = UserForm1.TextBox2.Value
    Worksheets("2012-2013").Range("C5").Value = UserForm1.TextBox3.Value
    Worksheets("2012-2013").Range("D5").Value = UserForm1.TextBox4.Value
    UserForm1.Hide
    
    End Sub
    If I put values "A:A", "B:B", etc it will input the entered value for the whole column. I need it to find the next row and input the values correspondingly.

    For example, when I do it the first time enter values into A5, B5, C5, D5 then the second time enter the values into A6, B6, C6, D6, etc, etc, etc.

    The columns are always fixed. Values from TextBox1 always go into Column A. Values from TextBox2 always go into Column B. Values from TextBox3 always go into Column C. Values from TextBox4 always go into Column D.
    Last edited by roki4; 05-17-2012 at 05:41 PM.
    B.Econ, CFA

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