View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Data Validation twist

Hi Carim,

This should input the first character in a DV list for any cell on the sheet
that has a DV list.

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo done:
If Target(1).Validation.Type = xlValidateList Then
Application.EnableEvents = False
Target(1) = Left(Target(1), 1)
End If
done:
Application.EnableEvents = True
End Sub

If you don't want this to affect all DV list cells on the sheet, you will
need to perform some other check on the Target to limit the change.

Regards,
Peter T


"Carim" wrote in message
ups.com...
Hi,

Is there a way, for a data validation based on a List, to only input
the first character of the selected choice ?
TIA
Carim