Hi, Please review my small code, is there any problem, i just want to enter two values to second sheet from 1st sheet. but it's not working with following code. sharing just part of code.
VBA Code:
Sub SaveButton()
Dim sh, sh2, sh3 As Worksheet
Dim LR, LRB, ID, l, i As Long
Set sh = ThisWorkbook.Sheets("MRN") 'Sheet 1
Set sh2 = ThisWorkbook.Sheets("mrnData") 'Sheet 2
Set sh3 = ThisWorkbook.Sheets("SubmitCS") 'Sheet 3
LR = sh2.Cells(Rows.Count, 1).End(xlUp).Row + 1 'Last row of sheet 2
LRB = sh3.Cells(Rows.Count, 1).End(xlUp).Row + 1 'Last row of sheet 3
For i = 8 To LRB 'entering to last empty row starting from 8th row
With sh3
.Cells(LRB, 1) = Range("Date").Value
.Cells(LRB, 2) = Range("ID").Value
End With
Next i
End Sub