Have to code but getting problem if more then one character is in C13. Works perfect if only one character is typed in cell,how can I change
it so if more then one invalid character is in cell? Thanks for any suggestions. Z
For example this get error 45 elm. 4/23/2015
Private Sub Worksheet_Change(ByVal Target As Range)
Dim str, i As Long
str = Array(".", "/", "\")
With Range("C13")
For i = LBound(str) To UBound(str)
If InStr(1, .Value, str(i)) > 0 Then
jobbox1.Show
End If
Next i
End With
End Sub
This is the code on userform yes button
Private Sub CommandButton1_Click()
Dim str, i As Long
'List of characters
str = Array(".", "/", "\")
With Range("C13")
For i = LBound(str) To UBound(str)
If InStr(1, .Value, str(i)) > 0 Then
.Value = Replace(.Value, str(i), "")
End If
Next i
End With
Unload Me
Range("C13").Select
End Sub
Bookmarks