Hi excel users.
I need a message to pop up after the user selects a value from a data valadation list. I almost have it working except when I select a range of cells and clear them I get a 'type mismatch' error message. What have I done wrong?
Thanks.
I need a message to pop up after the user selects a value from a data valadation list. I almost have it working except when I select a range of cells and clear them I get a 'type mismatch' error message. What have I done wrong?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim mycell As Object
Set mycell = Range("g22")
If Target <> Range("g22") Then
Exit Sub
Else
If mycell.Value <> "" Then
MsgBox "Remember to save your data", vbDefaultButton1
End If
End If
End Sub
Thanks.