Change this line [vba]With WsTgt.Range("A" & NextEmptyRow(WsTgt)) [/vba] to this [vba]With TargetSheet.Range("A" & NextEmptyRow(TargetSheet))[/vba]
You will need to change all references of "Activesheet" to "SourceSheet" instead.
Change this line [vba]With WsTgt.Range("A" & NextEmptyRow(WsTgt)) [/vba] to this [vba]With TargetSheet.Range("A" & NextEmptyRow(TargetSheet))[/vba]
You will need to change all references of "Activesheet" to "SourceSheet" instead.