I have a macro which is as follows:
Dim oval
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Value = Null Then Exit Sub
Application.EnableEvents = False
oval = Target.Value
MsgBox Target.Count
Application.EnableEvents = True
End Sub
When I run the following macro and when I select multiple rows and then delete it, it throws the error below. It only happens for multiple rows. I also tried to add a condition which says If Target.Count > 1 Then Exit Sub and that didn't seem to fix it as well.
Microsoft Visual Basic
Run-time error '13':
Type mismatch
NullwithvbNullString