Re : Problème Format textbox %
Bonsoir, Dranreb
'ai testé mais il me renvoie True ou False ? Ci dessous le code complet car tout à l'heure j'avais oublié.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Test1, Test2
Test1 = ActiveCell.Column - 1
Test2 = ActiveCell.Row - 6
If Not Application.Intersect(Target, Range("a6:cm58")) Is Nothing Then
Range("a6:cm58").Interior.ColorIndex = xlNone
Range(ActiveCell.Address, ActiveCell.Offset(0, -Test1).Address).Interior.ColorIndex = 6
Range(ActiveCell.Address, ActiveCell.Offset(-Test2, 0).Address).Interior.ColorIndex = 6
ActiveCell.Offset(0, -Test1).Interior.ColorIndex = 7
ActiveCell.Offset(-Test2, 0).Interior.ColorIndex = 7
ActiveCell.Interior.ColorIndex = 7
Range("O3") = ActiveCell.Address(0, 0)
Range("P3") = ActiveCell.Value
Range("Q3") = ActiveCell.Offset(-Test2, 0).Value
Range("R3") = ActiveCell.Offset(0, -Test1).Value
UserForm1.TextBox1.Value = ActiveCell.Address(0, 0)
UserForm1.TextBox2.Value = ActiveCell.Value = Format(ActiveCell.Value, "###%")
UserForm1.TextBox3.Value = ActiveCell.Offset(-Test2, 0).Value
UserForm1.TextBox4.Value = ActiveCell.Offset(0, -Test1).Value
End If
End Sub
@+