Below is the VBScript code for deleting the duplicates from one excel workbook and then copying it to another, when I run it I\'m getting an error;
Ob
VBScript doesn't support implicit use of the application object. You have to use it explicitly. VBScript also doesn't support named arguments (name:=value
) or Excel built-in constants (xlYes
). Change this line:
activesheet.UsedRange.RemoveDuplicates Columns=Array(), Header=xlYes
into this:
objExcel.ActiveSheet.UsedRange.RemoveDuplicates Array(), 1