Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave has provided some excellent code which I am using, BUT the problem is as
follows. The "ActiveSheet" command seems to activate the worksheet in which the macro is stored (and NOT the worksheets which I wish to print in DestinationFileName). Even though the worksheets in the 2nd file have been activated, they are not actually the ones being saved to PDF. "Ron de Bruin" wrote: Eric, I not test it but what is going wrong ? See my page also http://www.rondebruin.nl/pdf.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Eric_G" wrote in message ... 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 . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting multiple sheets | Excel Programming | |||
Selecting Multiple Sheets in VBA | Excel Worksheet Functions | |||
selecting multiple sheets | Excel Programming | |||
selecting multiple sheets | Excel Programming | |||
Changing the value in multiple sheets without selecting those sheets | Excel Programming |