Sub trois()
'
' trois Macro
' Macro enregistrée le 27/06/2008 par Administrateur
'
'
ActiveCell.Range("A1:A3").Select
Set isect = Application.Intersect(ActiveCell.Range("A1:A3"), Range("B12:F12"))
If Not isect Is Nothing Then
MsgBox ("Attention vous allez modifier une Formule")
ActiveCell.Range("A1").Select
Else
Set isect = Application.Intersect(ActiveCell.Range("A1:A3"), Range("B2:F9"))
If isect Is Nothing Then
ActiveCell.Range("A1").Select
Else
selection.Borders(xlDiagonalDown).LineStyle = xlNone
selection.Borders(xlDiagonalUp).LineStyle = xlNone
With selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
selection.Borders(xlInsideHorizontal).LineStyle = xlNone
ActiveCell.FormulaR1C1 = "3"
End If
End If
End Sub