Bonsoir
Solution pas trop élégante mais bon pas mieux
Remplaces la macro actuelle par celle-ci
'CONTROLE DES DONNEES
Private Sub CommandButton1_Click()
Dim c As Control
For Each c In UserForm1.Controls
Select Case TypeName(c)
Case "TextBox", "ComboBox"
c.Visible = True ' Quelle utilité ?
If Left(c.Parent.Name, 5) = "Frame" Then
If Me.Controls(c.Parent.Name).Visible = False Then GoTo PasCeluiLa
End If
If c.Value = "" Then
c.BackColor = RGB(255, 0, 0)
MsgBox "Merci de Completer les Zones Manquantes!"
Exit Sub
End If
End Select
PasCeluiLa:
Next
MsgBox "Votre saisie est maintenant complète"
If MsgBox("VOULEZ-VOUS ENREGISTRER LES DONNEES", vbQuestion + vbYesNo) = vbYes Then
MsgBox ("POUR ENREISTRER LES DONNEES CLICQUER SUR LE BOUTON ENREGISTRER")
CommandButton2.Visible = True
End If
End Sub
En surligné une question