hi,
The below code is working fine in Excel 2013 version to save a sheet as PDF but it giving error while running on MAC,
The Error Code is: "Run Time Error 438
Object Doesn't support this property of method.
Can anyone solve the issue.
The below code is working fine in Excel 2013 version to save a sheet as PDF but it giving error while running on MAC,
The Error Code is: "Run Time Error 438
Object Doesn't support this property of method.
Can anyone solve the issue.
Code:
Dim str As String, myfolder As String, myfile As String str = "Do you want to save the sheet to a single pdf file?" & Chr(10) For Each sht In ActiveWindow.SelectedSheets str = str & sht.Name & Chr(10) Next sht answer = MsgBox(str, vbYesNo, "Continue with save?") If answer = vbNo Then Exit Sub 'Ask for a directory With Application.FileDialog(msoFileDialogFolderPicker) .Show myfolder = .SelectedItems(1) & "\" End With 'Ask for a file name myfile = InputBox("Enter file name", "Save as..") 'Save sheets to pdf file ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ myfolder & myfile _ , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=True