G
Guest
Hello,
I have set up a little workbook that has three sheets in it.
Sheet 1:
is a suedo user form that the user enters data into formatted cells on the
sheet. each cell that a user enters data into is named
Sheet 2: Temp Table
This sheet is a database sheet that has columns that correspond to each cell
on the sheet 1. The data for this table comes from the user entering it into
sheet 1
Sheet 3: Site Reading Log
This sheet is the master log.
The idea is that users would enter values into the 'form' on sheet one.
Sheet 2 stores those values in a single row. Once the user clicks 'Submit'
on SHeet 1, the code is suppsoed to copy the row from sheet 2, into the next
available row in sheet three.
now, this code below does this, but there is a problem. If i try to enter a
new set of data, when i click submit, the code overwrites the data stored in
the previous rows with the new data pasted. What i end up wiht is multiple
rows, containing the same data.
What i actually want is a list of all my data, each in its own row.
Can any one help me with thsi problem?
Code ------
Private Sub CmdSubmit_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Site Reading Log")
' find first empty row in database
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Worksheets("TempTable").Range("DailyReadingEntry").Copy ws.Cells(iRow, 1)
End Sub
I have set up a little workbook that has three sheets in it.
Sheet 1:
is a suedo user form that the user enters data into formatted cells on the
sheet. each cell that a user enters data into is named
Sheet 2: Temp Table
This sheet is a database sheet that has columns that correspond to each cell
on the sheet 1. The data for this table comes from the user entering it into
sheet 1
Sheet 3: Site Reading Log
This sheet is the master log.
The idea is that users would enter values into the 'form' on sheet one.
Sheet 2 stores those values in a single row. Once the user clicks 'Submit'
on SHeet 1, the code is suppsoed to copy the row from sheet 2, into the next
available row in sheet three.
now, this code below does this, but there is a problem. If i try to enter a
new set of data, when i click submit, the code overwrites the data stored in
the previous rows with the new data pasted. What i end up wiht is multiple
rows, containing the same data.
What i actually want is a list of all my data, each in its own row.
Can any one help me with thsi problem?
Code ------
Private Sub CmdSubmit_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Site Reading Log")
' find first empty row in database
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Worksheets("TempTable").Range("DailyReadingEntry").Copy ws.Cells(iRow, 1)
End Sub