HI All, I'm trying to merge 2 command butons from the same workbook but on different sheets. The command button work fine by them self the code for them is below
Private Sub CommandButton1_Click()
Rows("11").Select
Selection.Insert Shift:=xlDown
Rows("11").Select
End Sub
Private Sub CommandButton1_Click()
Sheets("Punch Detail").Select
Application.CutCopyMode = False
Rows("5:5").Select
Selection.Copy
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
I'm not to good at code yet but I tried this but it won't work the code is below.
Private Sub CommandButton1_Click()
Rows("11").Select
Selection.Insert Shift:=xlDown
Rows("11").Select
Sheets("Punch Detail").Select
Application.CutCopyMode = False
Rows("5:5").Select
Selection.Copy
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
Could somone please help me with this code as I'm not good at it yet and don't no many of the functions in excel.
Thanks Matt
Private Sub CommandButton1_Click()
Rows("11").Select
Selection.Insert Shift:=xlDown
Rows("11").Select
End Sub
Private Sub CommandButton1_Click()
Sheets("Punch Detail").Select
Application.CutCopyMode = False
Rows("5:5").Select
Selection.Copy
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
I'm not to good at code yet but I tried this but it won't work the code is below.
Private Sub CommandButton1_Click()
Rows("11").Select
Selection.Insert Shift:=xlDown
Rows("11").Select
Sheets("Punch Detail").Select
Application.CutCopyMode = False
Rows("5:5").Select
Selection.Copy
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
Could somone please help me with this code as I'm not good at it yet and don't no many of the functions in excel.
Thanks Matt