I try to bounce a Form if the selection is in column 4 and only 1 cell is selected and the cell next in column 3 is empty
If the condition is true it works
But if the condition is false, an error comes out:
run time error '13': type mismatch,
On the if line
That's the code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 4 And Target.Cells.Count = 1 And Target.Offset(, -1).Value = 0 Then
C = Target.Offset(, -1).Address
UserForm1.Show
End If
End Sub