LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Problems executing commands on one file from another

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a bat file from Excel Mr BT[_2_] Excel Worksheet Functions 9 April 16th 07 09:18 PM
Executing Excel menu commands from VB Ed White Excel Programming 0 May 11th 06 10:36 PM
combinations of checkboxes and executing commands dreamz[_9_] Excel Programming 4 October 28th 05 03:34 PM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM
Problems executing Excel VBA code in Microsoft Office 2003 Umesh Excel Programming 3 July 24th 03 12:45 AM


All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"