I am using the below code to try to copy and paste B4 from sheet 10 to sheet 6 and then in column b of sheet 6 enter a time stamp.
However, I am getting the subscript out of range
error on the line of code where the * is.
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = ThisWorkbook.Sheets(Sheet10Name) ****
Set pasteSheet = ThisWorkbook.Sheets(Sheet6Name)
copySheet.Range("B4").Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Range("B" & (ActiveCell.Row)).Select
ActiveCell.Value = Now()
Application.CutCopyMode = False
Application.ScreenUpdating = True
Now apparently I am not getting the now() to insert the time stamp in column b of sheet6.
Correct end result
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = ThisWorkbook.Sheets(Sheet10.Name)
Set pasteSheet = ThisWorkbook.Sheets(Sheet6.Name)
copySheet.Range("B4").Copy
pasteSheet.Cells(pasteSheet.Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
pasteSheet.Cells(pasteSheet.Rows.Count, 1).End(xlUp).Offset(0, 1).Value = Now()
Application.CutCopyMode = False
Application.ScreenUpdating = True