1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Private Sub bouton_Go_Click()
MsgBox ("bonjour")
Dim Maxi As Integer
Dim Mini As Integer
Dim i As Integer
On Error Resume Next 'si aucun n'a été cliqué !
With Userformepaisseur
Mini = Switch(.OptionButton1, 180, .OptionButton2, 190, .OptionButton3, 200)
Maxi = Switch(.OptionButton4, 200, .OptionButton5, 210, .OptionButton6, 220)
End With
If Err.Number <> 0 Then Exit Sub
If Mini = 180 And Maxi = 220 Then
Sheets("Données").Select
For i = 1 To 500
If Cells(i, 10).Value < 180 And Cells(i, 10).Value > 200 Then
Cells(i, 79).Value = 1
End If
Next i
End If
End If
ActiveWorkbook.RefreshAll
Sheets("Diagramme_bar_defaut").Select
End Sub |
Partager