Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am executing a macro from one worksheet and wish to perform actions on
another. With the commands below, I am able to open the existing file called "destinationfile" which contains a number of worksheets. It's with the 2nd command line below where I get an error message; for some reason, I am unable to "ACTIVATE" the file which I just opened (i.e. destinationfile) in order to select specific worksheets (called "Investment Models E" and "Open Models E") and save them as a combined PDF document. NOTE that these commands are being executed from a master excel file (and not from the destinationfile itself). This is where I am having issues. Any assistance would be appreciated. Thanks. Workbooks.Open Filename:=Destinationfile, UpdateLinks:=3 Windows(destinationfile).Activate temp_file_name = "File_1.pdf" 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 | |||
Executing a bat file from Excel | Excel Worksheet Functions | |||
Executing Excel menu commands from VB | Excel Programming | |||
combinations of checkboxes and executing commands | Excel Programming | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
Problems executing Excel VBA code in Microsoft Office 2003 | Excel Programming |