E
Eric_G
Can you see something inherently wrong with this code which is being
executed from 1 excel file on another:
Workbooks.Open Filename:="c:\File_2.xlsx", UpdateLinks:=3
xlfile_drive = "c\"
temp_file_name = "Savename.xlsx"
Workbooks("File_2.xlsx").Activate
Sheets(Array("Investment Models E", "Open Models E")).Select
Sheets("Investment Models E").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
xlfile_drive & temp_file_name _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=False
executed from 1 excel file on another:
Workbooks.Open Filename:="c:\File_2.xlsx", UpdateLinks:=3
xlfile_drive = "c\"
temp_file_name = "Savename.xlsx"
Workbooks("File_2.xlsx").Activate
Sheets(Array("Investment Models E", "Open Models E")).Select
Sheets("Investment Models E").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
xlfile_drive & temp_file_name _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas _
:=False, OpenAfterPublish:=False