Hi Guys,
Very first time using VBA - complete Newbie. I'm using the below code to basically organise and copy data into a monthly master data sheet. I would want to build in the control to prevent duplicate values to be posted in the master data with an error message. Appreciate your help
Very first time using VBA - complete Newbie. I'm using the below code to basically organise and copy data into a monthly master data sheet. I would want to build in the control to prevent duplicate values to be posted in the master data with an error message. Appreciate your help
Code:
Sub Append_data()
Range("A1").Select
Selection.EntireRow.Delete
Selection.CurrentRegion.Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\Users\amunir\Documents\Alghanim VBA\VBA\Orders.xlsx"
Range("A1").Select
Selection.End(xlDown).Select
' Range("A3259").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
ActiveWindow.Close savechanges:=True
Range("A1").Select
Application.CutCopyMode = False
End Sub
Last edited by a moderator: