Private Sub CommandButton7_Click()
On Error Resume Next
If Liste2.ListCount = 0 Then
MsgBox "Aucune enveloppe à traiter", , "Enveloppe"
Exit Sub
End If
If OptionButton1 = True And Liste3.ListIndex < 0 Then
MsgBox "Enveloppe non séléctionnée", , "Enveloppe"
Exit Sub
End If
If OptionButton2 = True And LargEnvel = "" Then
MsgBox "Largeur Enveloppe non renseignée", , "Enveloppe"
Exit Sub
End If
If OptionButton2 = True And HautEnvel = "" Then
MsgBox "Hauteur Enveloppe non renseignée", , "Enveloppe"
Exit Sub
End If
Workbooks.Add
ActiveWindow.DisplayGridlines = False
FormatEnvel
Unload Envel
End Sub