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
| Private Sub CmdEnre_Click()
Dim ligne As Long
Dim i As Long
Dim ctrl As Control, ctrlerr As Control
Dim erreur As Boolean
With UFsaisie
Call ligneBrouillon
If TxtNom <> "" And TxtPrenom <> "" Then
ligne = Range("B2").CurrentRegion.Rows.Count + 2 'pour commencer en ligne 4
If ligneBrouillon = "" Then
InjectionDonnees
Else: InjectionDonneesBrouillon
End If
ThisWorkbook.Save
If LblObli.Visible = True Then
LblObli.Visible = False
End If
On Error Resume Next
Select Case MsgBox("Voulez vous imprimer le formulaire?", vbQuestion + vbYesNoCancel, "Impression du formulaire")
Case Is = vbYes
Unload UFsaisie
With Sheets("IMPRESSION EEA")
.PrintPreview
End With
remiseAzero
RemiseAzeroCompetences
UFsaisie.Show 0
Case Is = vbNo
remiseAzero
RemiseAzeroCompetences
Case Is = vbCancel
End Select
Else
LblObli.Visible = True
'End If
End If
End With
End Sub |