Application.ScreenUpdating = False For i = 1 To 60000 If i Mod 15 0 Then Rows(i).Hidden True Next Application.ScreenUpdating = True MsgBox "fait"
Private Sub CommandButton5_Click() Dim pm As Range, debut As Double debut = Timer Set pm = par_boucle(Range("A1:s60000")) MsgBox "fait en " & Timer - debut & " secondes" End Sub Private Function par_boucle(ByVal pt As Range) As Range Dim r As Range For Each r In pt.Rows If r.Hidden = True Then If par_boucle Is Nothing Then Set par_boucle = r Else Set par_boucle = Union(par_boucle, r) End If End If Next End Function
Sub test() Dim Rg As Range Dim X As Range, A As Long, Adr As String Const Y As Integer = 16384 Set Rg = Range("A1:A" & Y) Set X = Rg.SpecialCells(xlCellTypeConstants, 1) A = X.Areas.Count MsgBox A End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question