Event Procedure not working
Hi AD108,
Try changing:
If Target.Address = "A:A" Then
to
If Target.Column = 1 Then
However, why not use Excel's data validation rather than even code?
---
Regards,
Norman
"AD108" wrote in message
...
I am just working on a simple data validation code, and its not working.
Any help would be appreciated. Thanks in advance
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "A:A" Then
If Len(Target) 5 Then
MsgBox "Must be 5 or less Characters"
Target.ClearContents
End If
End If
End Sub
--
Ariel Dugan
Assistant Manager
Down To Earth Natural Foods
|