Bonjour à tous,
J'ai un problème pour appeler une procédure. Les macros sont assez simples mais l'appelle ne fonctionne pas. J'ai besoin de vos avis d'expert.
Voici les 2 modules concernés:
Sub Image125_QuandClic()
Application.ScreenUpdating = False
X = Range("C65000").End(xlUp).Row
If Cells(X, 3).Value = 1 Then
Exit Sub
Else
Rows(X).Delete
Module8.testcouleur
End If
End Sub
Sub testcouleur()
Application.ScreenUpdating = False
Dim DernM As Integer
With Worksheets("Anf")
DernM = Range("M65536").End(xlUp).Row
End With
Range("PremL" & ":" & "M" & DernM & "").Select
For Each rw In Range("PremL" & ":" & "M" & DernM & "").Rows
If Range("AN").Value <> 0 Then
If rw.Value < Range("AN").Value Then
[Anf!q4] = Cells(DernM, 13).Value
Cells(DernM, 13).Select
Else
dep = rw.Row
[Anf!q4] = Cells(dep - 1, 13).Value
Cells(dep - 1, 13).Select
End
End If
Else
[Anf!q4] = 0
Range("PremL").Select
End If
Next rw
End Sub
Le problème est que le module 8 ne se lance pas.
Pouvez vous m'aider?
J'ai un problème pour appeler une procédure. Les macros sont assez simples mais l'appelle ne fonctionne pas. J'ai besoin de vos avis d'expert.
Voici les 2 modules concernés:
Sub Image125_QuandClic()
Application.ScreenUpdating = False
X = Range("C65000").End(xlUp).Row
If Cells(X, 3).Value = 1 Then
Exit Sub
Else
Rows(X).Delete
Module8.testcouleur
End If
End Sub
Sub testcouleur()
Application.ScreenUpdating = False
Dim DernM As Integer
With Worksheets("Anf")
DernM = Range("M65536").End(xlUp).Row
End With
Range("PremL" & ":" & "M" & DernM & "").Select
For Each rw In Range("PremL" & ":" & "M" & DernM & "").Rows
If Range("AN").Value <> 0 Then
If rw.Value < Range("AN").Value Then
[Anf!q4] = Cells(DernM, 13).Value
Cells(DernM, 13).Select
Else
dep = rw.Row
[Anf!q4] = Cells(dep - 1, 13).Value
Cells(dep - 1, 13).Select
End
End If
Else
[Anf!q4] = 0
Range("PremL").Select
End If
Next rw
End Sub
Le problème est que le module 8 ne se lance pas.
Pouvez vous m'aider?