I have been trying to create code for the following.
Data is captured on a excel spreadsheet designed as a form. The date is captured in column range B1-B48
I want to transfer that to our summary spreadsheet where we hold the data for each form completed in rows. (summary sheet-testing).
The data should be pasted transposed and find the next blank line and not over write any other entries.
Problems with my code are:-
in my summary sheet testing the data is writing to row 49. So its usng the last cell in the 'form' to determine where to paste the data. Rather than the next empty row.
the data is not being pasted transposed to the next empty line it is always over writing row 49
This is my first go at this be gentle.
Paul
Private Sub CommandButton1_Click()
ActiveSheet.Range("B1:B48").Copy
Workbooks.Open Filename:="https://catsprotection.sharepoint.com/sites/Crawley/FinanceDocuments/Adoptions/Testing Area/summary sheet - testing.xlsx"
eRow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
If eRow >= 1 Then eRow = eRow + 1
ActiveSheet.Cells(eRow, 1).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, Skipblanks:=False, Transpose:=True
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.CutCopyMode = False
End Sub