1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
| Option Explicit
Public Sub essai_minuscule()
Dim Ti As Single
Ti = Timer
Dim mode_calc As Variant
With Application
.EnableEvents = False
.ScreenUpdating = False
mode_calc = .Calculation
.Calculation = xlCalculationManual
End With
Dim dern_row As Long, dern_column As Long
Dim i As Long, j As Long
'Mise en minuscules
With Sht_Essai
dern_column = .Cells(1, .Columns.Count).End(xlToLeft).Column
dern_row = .Cells(.Rows.Count, 1).End(xlUp).Row
ReDim T(1 To dern_row, 1 To dern_column)
T = .Range("A1", .Cells(dern_row, dern_column)).Value
For i = LBound(T, 1) To UBound(T, 1)
For j = LBound(T, 2) To UBound(T, 2)
T(i, j) = LCase(T(i, j))
Next j
Next i
With .Range("A1").Resize(UBound(T, 1), UBound(T, 2))
.ClearContents
.Value = T
End With
.Calculate
End With
With Application
.Calculation = mode_calc
.EnableEvents = True
.ScreenUpdating = True
End With
Debug.Print Timer - Ti
End Sub |
Partager