Hi all again. I need help on the following code
Private Sub CommandButton2_Click()
Workbooks.Open ("D:\Book2.xlsx")
Application.Goto Reference:="Table1"
Selection.ClearContents Windows("Book1.xlsm").Activate
Range("Table1").Select
Selection.Copy
Windows("Book2.xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
Instead of the "Clearcontent" in the code above in red.
I need help on a code that will remove all the duplicate lines in the end.
So it copy/paste and the check for duplicate lines and remove them save
Private Sub CommandButton2_Click()
Workbooks.Open ("D:\Book2.xlsx")
Windows("Book1.xlsm").Activate
Range("Table1").Select
Selection.Copy
Windows("Book2.xlsx").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Somewhere Over here should be that line i think
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
Thanks in advance
Bookmarks