Dim flag As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
Dim data1 As String
Dim cellule As Range
If flag = True Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("a10:a1000")) Is Nothing Then
flag = True
Target.Value = Evaluate("PROPER(""" + Target.Value + """)")
End If
If Not Intersect(Target, Range("b10:b1000")) Is Nothing Then
flag = True
Target.Value = UCase(Target.Value)
End If
flag = False
End Sub
Application.EnableEvents = False
Met le code ici
Application.EnableEvents = True
Application.EnableEvents = False
Application.EnableEvents = [B]True[/B]
Dim data1 As String
Dim cellule As Range
If flag = True Then Exit Sub
If Target.Count > 1 Then Exit Sub
[B]Application.EnableEvents = False[/B]
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Range("a10:a1000")) Is Nothing Then
Application.EnableEvents = False
flag = True
Target.Value = Evaluate("PROPER(""" + Target.Value + """)")
End If
If Not Intersect(Target, Range("b10:b1000")) Is Nothing Then
Application.EnableEvents = False
flag = True
Target.Value = UCase(Target.Value)
End If
Application.EnableEvents = True
End Sub