...
Case 14
...
Case Else
MsgBox "Pas hop. On est sur la colonne " & Target.Column.
End Select
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub ' // <-- pour éviter que ça coince si on sélectionne plusieurs cellules
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cellule As Range
If Target.Count > 1 Then
For Each Cellule In Target
Worksheet_Change Cellule
Next
End If
...
1. Private Sub Worksheet_Change(ByVal Target As Range)
2. If Target.Count > 1 Then Exit Sub
3. Select Case Target.Column
4. Case 3 To 13, 15, 27, 28, 32, 33, 36, 37, 39
5. If Target.Value <> UCase$(Target.Value) Then
6. Target.Value = UCase$(Target.Value)
7. Msgbox "Et hop, un UCASE sur la colonne " & Target.Column
8. End If
9. Case 14
10. If Target.Value <> StrConv(Target.Value, vbProperCase) Then
11. Target.Value = StrConv(Target.Value, vbProperCase)
12. Msgbox "Et hop, un STRCONV sur la colonne " & Target.Column
13. End If
14. End Select
15. End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then# For Each Cellule In Target
Worksheet_Change Cellule
Next
End If
Select Case Target.Column
Case 3 To 13, 15, 27, 28, 32, 33, 36, 37, 39
If Target.Value <> UCase$(Target.Value) Then
Target.Value = UCase$(Target.Value)
End If
Case 14
If Target.Value <> StrConv(Target.Value, vbProperCase) Then
Target.Value = StrConv(Target.Value, vbProperCase)
End If
End Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then For Each Cellule In Target
Worksheet_Change Cellule
Next
Exit Sub
End If
Select Case Target.Column
Case 3 To 13, 15, 27, 28, 32, 33, 36, 37, 39
If Target.Value <> UCase$(Target.Value) Then
Target.Value = UCase$(Target.Value)
End If
Case 14
If Target.Value <> StrConv(Target.Value, vbProperCase) Then
Target.Value = StrConv(Target.Value, vbProperCase)
End If
End Select
End Sub