Hello all,
VBA newbie here been reading thread after thread trying to solve the Run time error 1004 Applicatin-Defined or Object-defined error. Eveything i can see looks correct. I'm not sure what im missing in this data Entry Form. I keep getting stuck on the following Code:
nextRow = dataSheet.Range("A" & dataSheet.Rows.Count).End(x1Up).Offset(1).Row
Here is the rest of the code in its entirety:
Sub Store_Data()
Dim sourceSheet As Worksheet
Dim dataSheet As Worksheet
Dim nextRow As Integer
Set sourceSheet = Sheets("Form")
Set dataSheet = Sheets("Data")
nextRow = dataSheet.Range("A" & dataSheet.Rows.Count).End(x1Up).Offset(1).Row
dataSheet.Cells(nextRow, 1).Value = sourceSheet.Range("G5").Value
dataSheet.Cells(nextRow, 2).Value = sourceSheet.Range("M5").Value
dataSheet.Cells(nextRow, 3).Value = sourceSheet.Range("G7").Value
dataSheet.Cells(nextRow, 4).Value = sourceSheet.Range("M7").Value
dataSheet.Cells(nextRow, 5).Value = sourceSheet.Range("G9").Value
dataSheet.Cells(nextRow, 6).Value = sourceSheet.Range("M9").Value
dataSheet.Cells(nextRow, 7).Value = sourceSheet.Range("G11").Value
dataSheet.Cells(nextRow, 8).Value = sourceSheet.Range("M11").Value
dataSheet.Cells(nextRow, 9).Value = sourceSheet.Range("G13").Value
dataSheet.Cells(nextRow, 11).Value = sourceSheet.Range("M13").Value
dataSheet.Cells(nextRow, 10).Value = sourceSheet.Range("G15").Value
Thank you in advance for any help.
VBA newbie here been reading thread after thread trying to solve the Run time error 1004 Applicatin-Defined or Object-defined error. Eveything i can see looks correct. I'm not sure what im missing in this data Entry Form. I keep getting stuck on the following Code:
nextRow = dataSheet.Range("A" & dataSheet.Rows.Count).End(x1Up).Offset(1).Row
Here is the rest of the code in its entirety:
Sub Store_Data()
Dim sourceSheet As Worksheet
Dim dataSheet As Worksheet
Dim nextRow As Integer
Set sourceSheet = Sheets("Form")
Set dataSheet = Sheets("Data")
nextRow = dataSheet.Range("A" & dataSheet.Rows.Count).End(x1Up).Offset(1).Row
dataSheet.Cells(nextRow, 1).Value = sourceSheet.Range("G5").Value
dataSheet.Cells(nextRow, 2).Value = sourceSheet.Range("M5").Value
dataSheet.Cells(nextRow, 3).Value = sourceSheet.Range("G7").Value
dataSheet.Cells(nextRow, 4).Value = sourceSheet.Range("M7").Value
dataSheet.Cells(nextRow, 5).Value = sourceSheet.Range("G9").Value
dataSheet.Cells(nextRow, 6).Value = sourceSheet.Range("M9").Value
dataSheet.Cells(nextRow, 7).Value = sourceSheet.Range("G11").Value
dataSheet.Cells(nextRow, 8).Value = sourceSheet.Range("M11").Value
dataSheet.Cells(nextRow, 9).Value = sourceSheet.Range("G13").Value
dataSheet.Cells(nextRow, 11).Value = sourceSheet.Range("M13").Value
dataSheet.Cells(nextRow, 10).Value = sourceSheet.Range("G15").Value
Thank you in advance for any help.