VBA Consolidation
thierry.b3
Messages postés
14
Statut
Membre
-
thierry.b3 Messages postés 14 Statut Membre -
thierry.b3 Messages postés 14 Statut Membre -
Bonjour,
Bonjour,
J'ai un problème avec mon algo sur deux lignes (je les ai mise en gras et surligné) et je ne comprends pas d'où proviennent mes erreurs Quelqu'un les voit il ?
Ci dessous mon code :
Dim Max As Integer
Dim j As Integer
Dim i As Integer
Dim k As Integer
Dim DerniereLigne As Integer
Dim LastRowConsolidation As Integer
------------------------------------------------------
Sub EffacerDonnées()
Worksheets ["Consolidation"].Select
Rows ["7:1000000"].Select
Selection.Clear
Range ["A"7].Select
End Sub
------------------------------------------------------
Sub Consolider()
Application.ScreenUpdating = False
EffacerDonnées
Max = ThisWorkbook.Worksheets.Count
For j = 5 To Max
Sheets [j].Select
DerniereLigne = Range["G55"].End[xlUp].Row
For i = 6 To DerniereLigne
Sheets [j].Select
Rows [i].Select
Selection.Copy
Sheets ["Consolidation"].Select
LastRowConsolidation = Range["A1000000"].End[xlUp].Row + 1
Cells [LastRowConsolidation, 1].Select
ActiveSheet.Paste
Application.CutCopyMode = False
Next i
Next j
Application.ScreenUpdating = True
MsgBox "La consolidation est terminée...", vbOKOnly + vbInformation, "Message"
End Sub
Bonjour,
J'ai un problème avec mon algo sur deux lignes (je les ai mise en gras et surligné) et je ne comprends pas d'où proviennent mes erreurs Quelqu'un les voit il ?
Ci dessous mon code :
Dim Max As Integer
Dim j As Integer
Dim i As Integer
Dim k As Integer
Dim DerniereLigne As Integer
Dim LastRowConsolidation As Integer
------------------------------------------------------
Sub EffacerDonnées()
Worksheets ["Consolidation"].Select
Rows ["7:1000000"].Select
Selection.Clear
Range ["A"7].Select
End Sub
------------------------------------------------------
Sub Consolider()
Application.ScreenUpdating = False
EffacerDonnées
Max = ThisWorkbook.Worksheets.Count
For j = 5 To Max
Sheets [j].Select
DerniereLigne = Range["G55"].End[xlUp].Row
For i = 6 To DerniereLigne
Sheets [j].Select
Rows [i].Select
Selection.Copy
Sheets ["Consolidation"].Select
LastRowConsolidation = Range["A1000000"].End[xlUp].Row + 1
Cells [LastRowConsolidation, 1].Select
ActiveSheet.Paste
Application.CutCopyMode = False
Next i
Next j
Application.ScreenUpdating = True
MsgBox "La consolidation est terminée...", vbOKOnly + vbInformation, "Message"
End Sub