Private Sub CommandButton1_Click()
For i = 1 To 10
If Sheets(2).Shapes("case" & i).TextFrame.Characters.Text = "" Then
MsgBox "Attention il manque des informations à renseignées!!": Exit Sub
Next
'créer un PDF
Dim Ledossier As String, Leclient As String, lerep As String
Ledossier = Range("B4").Value
lerep = "chemin" & "\" & [B4] & "\" ' à adapter
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
lerep & "_" & Ledossier & ".pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
from:=1, to:=1, OpenAfterPublish:=True
End If
End Sub