Adding data to the same worksheet

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • I have designed a VB program that’s takes data from 8 text boxes with a submit button it opens excel workbook creates sheet1 and then it inputs all the text boxes in row1 across 8 columns. What I want to do is when I submit another person’s data from my program I want it to go to the same work book and the same sheet and place that data in the next empty row.


    Thanks

  • Re: Adding data to the same worksheet


    Hi,
    This is something that i found helpful, put together/refined with help and thanks to Batman and RoyUK in this thread. Maybe you can add this to your code to determine the next row?


    Stefan
    p.s.
    It should be mentioned that this is checking column A for the next empty cell/row. If this cell/colum may have no entries at times, change to a column that allways carries data as to not loose/overwite data.




    Code
    Sub Next_Row()
    Dim FirstBlank As Range
    Set FirstBlank = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
    FirstBlank.Select
    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!