ahmed nahedh
New Member
- Joined
- Dec 24, 2018
- Messages
- 1
hello guys
i make excel sheet in link below and make macro for it to save as PDF put this error always stop me can you help me with that
i used this code :
Sub save_pdf()
Sheets("Sheet1").Select
Dim filename As String
Dim ChDir As String
filename = Range("A1")
ChDir = "C:\Users\alwaha\Desktop\doctors\PDF"
Sheets("Sheet1").Range("a1:i26").ExportAsFixedFormat Type:=xlTypePDF, filename:= _
ChDir & filename & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
End Sub
please see the pictures for more information
i make excel sheet in link below and make macro for it to save as PDF put this error always stop me can you help me with that

i used this code :
Sub save_pdf()
Sheets("Sheet1").Select
Dim filename As String
Dim ChDir As String
filename = Range("A1")
ChDir = "C:\Users\alwaha\Desktop\doctors\PDF"
Sheets("Sheet1").Range("a1:i26").ExportAsFixedFormat Type:=xlTypePDF, filename:= _
ChDir & filename & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
End Sub
please see the pictures for more information


