Philip1957
Board Regular
- Joined
- Sep 30, 2014
- Messages
- 185
- Office Version
- 365
- Platform
- Windows
Greetings,
Some days I amaze myself, other days I have trouble putting my socks on.
This should be an easy macro to create, but I'm just not having any success.
I want a macro for my (or someone else's) Personal.xlsb that will remove rows based on duplicate data in a column specified by the user.
I've got this:
clmn gets saved, I can see it in the Locals window.
I get a Run-time error '13': Type mismatch at the line
Any assistance would be greatly appreciated.
Thanks in advance for your time,
~ Phil
Some days I amaze myself, other days I have trouble putting my socks on.
This should be an easy macro to create, but I'm just not having any success.
I want a macro for my (or someone else's) Personal.xlsb that will remove rows based on duplicate data in a column specified by the user.
I've got this:
Code:
Option Explicit
Sub Rmv_Dupe_Rows()
Application.ScreenUpdating = False
'On Error Resume Next
Dim clmn As String
clmn = Application.InputBox("Enter the letter designating" & vbCrLf & "the column where the duplicate" & vbCrLf & "data is located.")
ActiveSheet.UsedRange.RemoveDuplicates Columns:=clmn, Header:=xlGuess
Application.ScreenUpdating = True
End Sub
clmn gets saved, I can see it in the Locals window.
I get a Run-time error '13': Type mismatch at the line
Code:
ActiveSheet.UsedRange.RemoveDuplicates Columns:=clmn, Header:=xlGuess
Any assistance would be greatly appreciated.
Thanks in advance for your time,
~ Phil