Sub ValeurCellule(R As Range) ' <--- ajouter les variables nécessaires debx, deby, etc...
Select Case R.Value
Case "A134", "A135", "A136", "A137"
debx = cel.Left + cel.Width / 2
deby = cel.Top + cel.Height / 2
finx = portext2.Left + portext2.Width / 2
finy = portext2.Top + portext2.Height / 2
lg = Sqr(((finx - debx) / (0.8 * cel.Width)) * ((finx - debx) / (0.8 * cel.Width)) + ((finy - deby) / cel.Height) * ((finy - deby) / cel.Height))
lgtot = lgtot + lg
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, debx, deby, finx, finy).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
debx = portext2.Left + portext2.Width / 2
deby = portext2.Top + portext2.Height / 2
finx = porte69.Left + porte69.Width / 2
finy = porte69.Top + porte69.Height / 2
lg = Sqr(((finx - debx) / (0.8 * cel.Width)) * ((finx - debx) / (0.8 * cel.Width)) + ((finy - deby) / cel.Height) * ((finy - deby) / cel.Height))
lgtot = lgtot + lg
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, debx, deby, finx, finy).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
End Select
End Sub