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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
Public WithEvents Groupeoption As MSForms.OptionButton
Public WithEvents monboutonok As MSForms.CommandButton
Private Sub Groupeoption_Click()
Select Case Groupeoption.Parent.Name
Case "Frame1"
frame1ok = True
maform.Frame2.Visible = True
Case "Frame2"
frame2ok = True
maform.Frame3.Visible = True
Case "Frame3"
frame3ok = True
maform.btnOK.BackColor = vbRed
End Select
End Sub
Sub monboutonok_Click()
Dim ctrl As Object
If frame1ok = False Then MsgBox "Vous devez faire un choix dans Historique des Mouvements !", vbExclamation, "ATTENTION": Exit Sub
If frame2ok = False Then MsgBox "Vous devez faire un choix dans Ordre de Tri !", vbExclamation, "ATTENTION": Exit Sub
If frame3ok = False Then MsgBox "Vous devez faire un choix dans Gamme de Panneau !", vbExclamation, "ATTENTION": Exit Sub
'ici j' a toi de debloquer le code je n'ai pas de tousmvts etc........
'Test si l'onglet temporaire TMP existe ou pas avec création
' Application.DisplayAlerts = False
' For Each sh In Worksheets
' If sh.Name = "TMP" Then sh.Delete
' Next
' ActiveWorkbook.Sheets.Add
' ActiveSheet.Name = "TMP"
' Sheets("TMP").Move after:=Sheets(Sheets.Count)
'If maform.Frame1.optvisu1.Value = True Then
' Load TOUSMVTS
' TOUSMVTS.Show
'End If
'If maform.Frame1.optvisu2.Value = True Then
' Load SORTIES
' SORTIES.Show
'End If
'If maform.Frame1.optvisu3.Value = True Then
' Load ENTREES
' ENTREES.Show
'End If
maform.btnOK.BackColor = &H8000000F
maform.Frame2.Visible = False
maform.Frame3.Visible = False
For Each ctrls In maform.Controls
'on teste si le type de control est un option
If TypeName(ctrls) = "OptionButton" Then ctrls = False
Next
frame1ok = False
frame2ok = False
frame3ok = False
MsgBox "et voila c'est fini"
End Sub |
Partager