VBA Excel错误运行时错误53文件未找到

时间:2020-04-06 08:43:21

标签: excel vba

此代码现在可以正常运行,出现时间错误53,找不到文件。不确定出什么事了

 Sub printxxx()
' Print_quote XXX Macro

ActiveSheet.PageSetup.Orientation = xlLandscape
Worksheets("Quote").PageSetup.PrintArea = "$H$6:$Z$133"
 strFile = ThisWorkbook.Path & "\" & strFile                           
   ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & CreateObject("Scripting.FileSystemObject").GetFile(ThisWorkbook.FullName).ParentFolder.Name & " XXXQuote ", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True                      
ActiveSheet.PageSetup.Orientation = xlPortrait                                                     
End Sub

0 个答案:

没有答案
相关问题