Re : decalaration variable
re
ca ne marche pas .
d
ans ma feuille 1, j'ai une procedure :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cell_Moy = Range(Cells(7, 21), Cells(7, 256).End(xlToLeft)).Find("moyenne")
................
If Not Application.Intersect(Target, Range(Cells(11, 2), Cells(60, Cell_Moy.Column))) Is Nothing Then......................;;;
End Sub
dans cette meme feuille, une autre procédure :
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range(Range("U7"), Cell_Moy)) Is Nothing Then..........
End Sub
Dans un module (affichage) , il y a une procedure
Sub Surlignage_Ligne
Set champ = Range(Cells(11, 2), Cells(60, Cell_Moy.Column))
.....End Sub
Si je mets Public Cell_Moy As Range dans le module,
ca plante
idem si je le mets dans la feuille
Que dois je faire ? merci
A+