Also, is there a way to stop the macro recorder before the Remove Duplicates process is started when one clicks OK?
Maybe the addition of a message box will look after this for you.
Adding to Alan's suggestion:
Code:
Sub RemoveDuplicates()
'
' RemoveDuplicates Macro
' Remove dupes on B, C, D
'
' Keyboard Shortcut: Ctrl+Shift+X
'
Dim lr As Long
Dim answer As Integer
answer = MsgBox("Are you sure you want to do this ?" & vbLf & _
"Click Yes to continue", vbYesNoCancel, _
"This is your chance to change your mind")
If answer <> vbYes Then Exit Sub
lr = Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("$A$1:L" & lr).RemoveDuplicates Columns:=Array(2, 3, 4), _
Header:=xlNo
End Sub
Bookmarks