Hi all,
This might be a silly question but i am new at VBA so can't seem to figure out what the error in my code it.
I have two sheets, sht1 and sht2, from which a user is to highlight the row to transfer sht2 from the next empty row and starting from column C. My code is as follows
Sub NewMove()
Dim sht1 As Worksheet
Dim sht2 As Worksheet
Set sht1 = Sheets("Sheet1")
Set sht2 = Sheets("Sheet2")
Selection.EntireRow.Select
Selection.Copy
sht2.Cells(Rows.Count, 3).End(xlUp).Offset(1, 1).PasteSpecial xlPasteValues
End Sub
Could someone please help me figure out where i am going wrong. Thank you
This might be a silly question but i am new at VBA so can't seem to figure out what the error in my code it.
I have two sheets, sht1 and sht2, from which a user is to highlight the row to transfer sht2 from the next empty row and starting from column C. My code is as follows
Sub NewMove()
Dim sht1 As Worksheet
Dim sht2 As Worksheet
Set sht1 = Sheets("Sheet1")
Set sht2 = Sheets("Sheet2")
Selection.EntireRow.Select
Selection.Copy
sht2.Cells(Rows.Count, 3).End(xlUp).Offset(1, 1).PasteSpecial xlPasteValues
End Sub
Could someone please help me figure out where i am going wrong. Thank you