A
Alice
I am trying to use VBA to check a new value in a cell against other
values in a column to alert the user as to whether it is a duplicate. I
would like to do this using a Message Box.
I already have code to check the length of the new value and would like
code that does something similar.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim LRange As Range
Set LRange = Range("B:B")
If Len(Target) > 27 Then
MsgBox "The value you entered is greater than 27 characters"
End If
End Sub
I am using Excel 97.
Thanx,
Alice.
values in a column to alert the user as to whether it is a duplicate. I
would like to do this using a Message Box.
I already have code to check the length of the new value and would like
code that does something similar.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim LRange As Range
Set LRange = Range("B:B")
If Len(Target) > 27 Then
MsgBox "The value you entered is greater than 27 characters"
End If
End Sub
I am using Excel 97.
Thanx,
Alice.