1 pièce(s) jointe(s)
options de confirmation gérées par l'utilsateur
Bonsoir le forum,
Je fais des applications sur mon blog et j'ai mis en place une option à cocher pour fermer le formulaire automatiquement ou pas.
Pièce jointe 647545
code du formulaire:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| Private Sub ok_Click()
Dim i%, tb1 As ListObject, ws1 As Worksheet
Application.ScreenUpdating = False
Set ws1 = Sheets("listes")
Set tb1 = ws1.ListObjects("fermUF")
If Me.unload1.Value = True Then
tb1.DataBodyRange(1, 1).Value = "unload1"
tb1.DataBodyRange(1, 1).Font.Color = RGB(0, 204, 153) 'vert
ElseIf Me.unload1.Value = False Then
tb1.DataBodyRange(1, 1).Value = "unload1"
tb1.DataBodyRange(1, 1).Font.ColorIndex = 3 'rouge
End If
Unload Me
Application.ScreenUpdating = True
End Sub |
code dans la page concernée:
Code:
1 2
| 'fermeture UF si option coche en parametres
If tb3.DataBodyRange(1, 1).Value = "unload1" And tb3.DataBodyRange(1, 1).Font.Color = RGB(0, 204, 153) Then Unload Me |
Maintenant j'aimerais savoir s'il est possible de le faire pour les confirmation de messages:
Code:
1 2
| If MsgBox("Confirmez-vous l'enregistrement ?", vbYesNo, _
"Demande de confirmation") = vbYes Then |
Merci