Hello everyone,
With this Macro, I want to capitalize all the cells of the following 3 columns: "A", "B" and "C".
Only when I run the Macro, only the cells in the first column are capitalized.
Where do you think the problem is?
Thank you for your suggestions
With this Macro, I want to capitalize all the cells of the following 3 columns: "A", "B" and "C".
Only when I run the Macro, only the cells in the first column are capitalized.
Where do you think the problem is?
Thank you for your suggestions
VBA Code:
Sub Mettre_En_Majuscule()
Dim rng As Range
Dim DLig As Long
DLig = Sheets("Parents").Cells(Rows.Count, 1).End(xlUp).Row
Set rng = Sheets("Parents").Range("A2:C" & DLig)
With rng
tablo = .Value 'matrice, plus rapide
For i = 1 To UBound(tablo)
tablo(i, 1) = UCase(tablo(i, 1))
Next
Application.EnableEvents = False
.Value = tablo
Application.EnableEvents = True
End With
End Sub