BASSDINGUE
XLDnaute Occasionnel
rebonjour le forum
j'ai le code suivant pour chercher le nombre le + grand dans la colonne A
Ca marche mais il va le chercher dans la feuille active alors que je precise qu'il doit chercher dans la " sheets("T_clt_formation")
me suis je trompé quelque part?
le code:
Public Function MaxNUMDEV() As Double
Dim vCell As Range
Dim Test As Integer
MaxNUMDEV = 0
For Each vCell In Sheets("T_CLT_FORMATION").Range(("A2:A") & Range("A65536").End(xlUp).Row)
Test = Val(vCell)
MaxNUMDEV = IIf(MaxNUMDEV > Test, MaxNUMDEV, Test)
Next vCell
End Function
merci pour votre aide
j'ai le code suivant pour chercher le nombre le + grand dans la colonne A
Ca marche mais il va le chercher dans la feuille active alors que je precise qu'il doit chercher dans la " sheets("T_clt_formation")
me suis je trompé quelque part?
le code:
Public Function MaxNUMDEV() As Double
Dim vCell As Range
Dim Test As Integer
MaxNUMDEV = 0
For Each vCell In Sheets("T_CLT_FORMATION").Range(("A2:A") & Range("A65536").End(xlUp).Row)
Test = Val(vCell)
MaxNUMDEV = IIf(MaxNUMDEV > Test, MaxNUMDEV, Test)
Next vCell
End Function
merci pour votre aide