+ Reply to Thread
Results 1 to 4 of 4

Populate next row on button click

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Populate next row on button click

    Hi guys,

    Having a complete pickle!

    So i have Data in a sheet about cars and their owners including Registration, Car make/model, Owner name, Event attended.

    This data will be entered by the user and on button click i want the data to go into another sheet to collect the data together (for example the first row on the new collector sheet will contain,

    A B C D
    Vauxhall Astra, John Smith, REG123, Classic Car Show.

    and on the next button click i want to populate

    A2,B2,C2,D2 then
    A3,B3,C3,D3 and so on

    i've read a few threads about people using a "NextRow" variable but just can't get my head around it...

    Thanks for reading!

    Gavin.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,168

    Re: Populate next row on button click

    Where will the data be entered?

    Do you have a sample file that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    09-18-2012
    Location
    Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Populate next row on button click

    Firstly, Thanks for getting back to me!

    Secondly , unfortunatly not as im in work!

    The data is being entered just in cells on the first sheet but in different parts, so im placing each cell into the collector sheet individually like this

    sheet5.range("A1")=sheet4.range("k3").text (Car Make)
    sheet5.range("B1")=sheet4.range("L3").text (Name)

    this will be on the button click but what i want is that each button click it will change from..

    1st

    sheet5.range("A1")=sheet4.range("k3").text (Car Make)
    sheet5.range("B1")=sheet4.range("L3").text (Name)

    2nd

    sheet5.range("A2")=sheet4.range("k3").text (Car Make)
    sheet5.range("B2")=sheet4.range("L3").text (Name)


    3rd

    sheet5.range("A3")=sheet4.range("k3").text (Car Make)
    sheet5.range("B3")=sheet4.range("L3").text (Name)


    Thanks again.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,168

    Re: Populate next row on button click

    Try this
    Please Login or Register  to view this content.
    or you can try this way -
    Please Login or Register  to view this content.

+ 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