我一直在使用代码将工作表保存为PDF。这一直没有问题,现在我收到run time error 1004
。与下面的任何帮助将不胜感激。
Sub ExportAsPDF()
ThisWorkbook.Sheets(
Array(
"Communication Services",
"Consumer Discretionary",
"Consumer Staples",
"Financials",
"Health care",
"Industrials",
"Information Technology",
"Materials",
"Real Estate",
"Utilities"
)
).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"S:\Shared Folders\Impact Investing\Investment\" & Format(Now(), "DD-MMM-YYYY"),
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
Worksheets("Communication Services").Select
End Sub