I have a simple file with VBA code that export sheet as pdf i created the file on excel 365 on windows, but when tried to us it on mac (excel for mac 2015) it give me an error here is the code:
Dim ID As String
ID = Sheets("Sheet1").Range("N1")
Sheets("Sheet1 (2)").Select
ChDir "D:\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="D:\" + ID + ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
Sheets("Sheet3").Select
End Sub
as I mentioned it works well on windows but on mac not working, please any help
Dim ID As String
ID = Sheets("Sheet1").Range("N1")
Sheets("Sheet1 (2)").Select
ChDir "D:\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="D:\" + ID + ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
Sheets("Sheet3").Select
End Sub
as I mentioned it works well on windows but on mac not working, please any help