Bonjour,
C'est sans doute tout bête mais je ne comprend pas pourquoi il me dit "Else sans If".
C'est sans doute tout bête mais je ne comprend pas pourquoi il me dit "Else sans If".
Code:
Sub P_print()
Dim zprint As Range
If Range("E50") <> "" Then zprint = "Print!$A$5:$G$61"
ElseIf Range("E35") <> "" Then zprint = "Print!$A$5:$G$46"
ElseIf Range("E20") <> "" Then zprint = "Print!$A$5:$G$31"
ElseIf Range("E5") <> "" Then zprint = "Print!$A$5:$G$16"
Else
MsgBox ("Aucune donnée à imprimer")
End Sub
End If
Sheets("Print").Range("zprint").PrintOut
End Sub