erreur sur macro

gege21

XLDnaute Occasionnel
bonjours a tous

je gêner un graphique via une macro qui marche bien sauf si je prend la dernier année ici 2014
je ne c pas pourquoi
 

Pièces jointes

  • Graphtest.zip
    47.2 KB · Affichages: 27
  • Graphtest.zip
    47.2 KB · Affichages: 36
  • Graphtest.zip
    47.2 KB · Affichages: 28

pierrejean

XLDnaute Barbatruc
Re : erreur sur macro

Re

VB:
......
An_ok = False
VAn = Sheets("Feuil1").TextBox1
For n = 1 To Sheets("Donnée").Range("A65536").End(xlUp).Row
If Year(Sheets("Donnée").Range("A" & n)) = VAn Then
An_ok = True
Exit For
End If
Next n
If An_ok = False Then
MsgBox ("Cette Année n'existe pas")
Exit Sub
End If
FirstCel = "": LastCel = ""
.........
 

Discussions similaires

Réponses
2
Affichages
171
Réponses
7
Affichages
372

Statistiques des forums

Discussions
312 489
Messages
2 088 848
Membres
103 973
dernier inscrit
okoazer