Hi
Please help with the following
Sub append_data()
'
' append_data Macro
'
'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.CurrentRegion.Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\Users\abdullah.alzadjali\Documents\Oman VBA\VBA\Orders.xlsx"
Range("A1").Select
Selection.End(xlDown).Select
'range("A3267").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.CurrentRegion.Select
Selection.CurrentRegion.Select
Selection.CurrentRegion.Select
ActiveSheet.Range("A1").CurrentRegion.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, _
7), Header:=xlYes
ActiveWindow.Close savechanges:=True
Application.CutCopyMode = False
Range("A1").Select
End Sub
I want to know what is wrong with the bold area I am trying to make it remove the duplicates and fit with any range. Please I am new in using VBA
Thanks
Please help with the following
Sub append_data()
'
' append_data Macro
'
'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Selection.CurrentRegion.Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\Users\abdullah.alzadjali\Documents\Oman VBA\VBA\Orders.xlsx"
Range("A1").Select
Selection.End(xlDown).Select
'range("A3267").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.CurrentRegion.Select
Selection.CurrentRegion.Select
Selection.CurrentRegion.Select
ActiveSheet.Range("A1").CurrentRegion.RemoveDuplicates Columns:=Array(1, 2, 3, 4, 5, 6, _
7), Header:=xlYes
ActiveWindow.Close savechanges:=True
Application.CutCopyMode = False
Range("A1").Select
End Sub
I want to know what is wrong with the bold area I am trying to make it remove the duplicates and fit with any range. Please I am new in using VBA
Thanks