Désolé pour ma réponse tardive pour cause de réunion...
En effet c'est curieux.
Explications.
La procédure doit traitée environ 1400 lignes
j ai fais un test : Si j'exécute la procédure sur mon PC directement cela fonctionne et le traitement des 1400 lignes se fait impeccable
Par contre si je le fais sur le réseau via notre serveur professionnel c'est là qu'il bug ...
Je vous ai remis le code en indiquant la ligne qui bug
Ne s'agit il pas d'un problème de version 32 ou 64 bits???
Merci et désolé de vous embêter avec cela (
Option Explicit
Dim f, ln, lgn, n, i, ret
' ajout =
Dim timedebut
Private Sub CommandButton2_Click()
' ajout
timedebut = Now()
Application.ScreenUpdating = False
BarreProgression.Show vbModeless
' fin ajout
Application.ScreenUpdating = False
Call MAJ_Feuil2
Set f = Sheets("Feuil2")
f.Range("A1").CurrentRegion.Offset(3, 0).Clear
For ln = 3 To Range("A" & Rows.Count).End(xlUp).Row
' ajout
BarreDeProgression ln / Range("A" & Rows.Count).End(xlUp).Row
' fin ajout
n = Year(Range("G" & ln)) - Year(Range("D" & ln)) + 1
lgn = Application.Max(3, f.Range("A" & Rows.Count).End(xlUp)(2).Row)
Range("A" & ln & ":AE" & ln).Copy
f.Range("A" & lgn & ":AE" & lgn + n - 1).PasteSpecial xlPasteAll ' c'est cette ligne qui bug
For i = 0 To n - 1
f.Range("O" & lgn + i) = Year(f.Range("D" & lgn)) + i
Next i
Next ln
Application.CutCopyMode = False
f.Select
' ajout
Unload BarreProgression
MsgBox ("Terminé en " & Format((Now() - timedebut), "n' ss''") & " !")
' fin ajout
MsgBox "Actualisation réussie!", vbInformation
End Sub