جرب هذا الكود
Sub PDF_ALL()
MyName = "D:\MR_" & Format(Date, "dd-mm-yyyy") & ".pdf"
Range("C45").Select
Sheets(Array("A", "B", "C", "D")).Select
Sheets("A").Activate
MyMsg = MsgBox("هل انت متاكد من اتمام عمليه الحفظ", 4, "تنبيه")
If MyMsg = 6 Then
ChDir "D:"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
MyName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
MsgBox "تم الحفظ"
Else
MsgBox "لم يتم الحفظ"
End If
End Sub