Bonjour,
Que dois je peux faire pour exclure de ma macro les colonnes PQ et UV ? Un Grand Merci d'avance 😀
Private Sub Workbook_Activate()
Dim F As Worksheet, Mode As String
Dim Sh As Worksheet, Rg As Range
Set Sh = Worksheets("RESERVE DEBLOCAGES")
Set Sh1 = Worksheets("Base")
Application.ScreenUpdating = False
Application.EnableEvents = False
Mode = Application.Calculation
Application.Calculation = xlCalculationManual
With Sh
Set Rg = .Range("A4:AD" & .Range("A65536").End(xlUp).Row)
End With
For Each F In Worksheets
If F.Name <> Sh.Name Or F.Name <> "Base" Then
Rg.AutoFilter Field:=1, Criteria1:=F.Name
Rg.SpecialCells(xlCellTypeVisible).Copy F.Range("A4")
End If
Next
Rg.AutoFilter
Application.Calculation = Mode
Application.EnableEvents = True
Set F = Nothing: Set Sh = Nothing: Set Rg = Nothing: Set Sh1 = Nothing
Que dois je peux faire pour exclure de ma macro les colonnes PQ et UV ? Un Grand Merci d'avance 😀
Private Sub Workbook_Activate()
Dim F As Worksheet, Mode As String
Dim Sh As Worksheet, Rg As Range
Set Sh = Worksheets("RESERVE DEBLOCAGES")
Set Sh1 = Worksheets("Base")
Application.ScreenUpdating = False
Application.EnableEvents = False
Mode = Application.Calculation
Application.Calculation = xlCalculationManual
With Sh
Set Rg = .Range("A4:AD" & .Range("A65536").End(xlUp).Row)
End With
For Each F In Worksheets
If F.Name <> Sh.Name Or F.Name <> "Base" Then
Rg.AutoFilter Field:=1, Criteria1:=F.Name
Rg.SpecialCells(xlCellTypeVisible).Copy F.Range("A4")
End If
Next
Rg.AutoFilter
Application.Calculation = Mode
Application.EnableEvents = True
Set F = Nothing: Set Sh = Nothing: Set Rg = Nothing: Set Sh1 = Nothing