Closed Thread
Results 1 to 4 of 4

adding data to new cell

  1. #1
    Registered User
    Join Date
    10-19-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    27

    adding data to new cell

    hi

    i am new to vba programing.i have small doubt

    i have a button when click that button the code is like this

    Private Sub CommandButton1_Click()
    Sheet1.Range("b2").value="raju"

    End Sub


    when i click the button "raju" word will be come for b2 .again click the button it come for b3 and b4 like this.

    what my question is it come for new line.

    have a nice day

    bye
    naga

  2. #2
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: adding data to new cell

    Use the forms toolbar to create the button and then use this code for the macro.

    Please Login or Register  to view this content.
    Also, you might want to check the rules for posting code in your thread.

  3. #3
    Registered User
    Join Date
    10-19-2009
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: adding data to new cell

    thanks for the reply

    Sheet1.Range("a65536").End(xlUp)(2, 1) = "raju"

    the above code work for new line but it starts from (a2,2) but i want to start it from(j11,8) how?

    bye
    naga

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: adding data to new cell

    naga, please take a few minutes to read the forum rules, and then edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

Closed 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