Hello -
I am trying to run a macro on a drop down list which i created using Data Validation. I copy the code that I need from one of the post here. It is working in the their worksheet (which I found on this forum) then I copy into my spreadsheet I gets an error "Run-Time error '13' - Type Missmatch. at this line" If Target.Value = "Value1" Then"
here code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
If Flag = True Then Exit Sub
If Target.Column = 1 Then
If Target.Value = "Value1" Then
If Not Intersect(Target, Range("A1:A" & LR)) Is Nothing Then
LR = Sheets("Tab1").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy
Sheets("Tab1").Range("A" & LR).PasteSpecial
Flag = True
Target.EntireRow.Delete
End If
End If
End If
Application.CutCopyMode = False
Flag = False
End Sub
Thanks,
vasu
Bookmarks