Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Print Another Excel File's Worksheet

Hi Gang

I need code in one Excel file that will print the contents of another
Excel file worksheet. I'd like to be able to specify the folder and
file to print (ie. m:\governance\expensereport.xls).

Can anyone help?

Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Print Another Excel File's Worksheet

this should get you started ....



Sub FetchFile()
Dim sFileName As String
Dim wb As Workbook
sFileName = Application.GetOpenFilename("Excel Files (*.xls),*.xls")

'check if Cancelled
If UCase(sFileName) < "FALSE" Then
Set wb = Workbooks.Open(sFileName, ReadOnly:=True)

wb.ActiveSheet.PrintOut Copies:=1, Collate:=True

wb.Close False 'close without saving!

End If
End Sub


"Andy" wrote:

Hi Gang

I need code in one Excel file that will print the contents of another
Excel file worksheet. I'd like to be able to specify the folder and
file to print (ie. m:\governance\expensereport.xls).

Can anyone help?

Andy

Reply
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
Can I change a file's properties in Excel? Ron100 Excel Discussion (Misc queries) 1 January 8th 10 04:10 PM
compair 2 excel file's and import data from 1 to the other Steven Van Laethem Excel Discussion (Misc queries) 1 July 30th 09 11:02 PM
opening new csv file in existing xls file's worksheet Shikha Excel Worksheet Functions 4 March 2nd 09 12:56 PM
Linking from a Combo box to another excel file's specific workshee James from Sage Excel Programming 0 January 3rd 08 06:37 PM
Need a program that gets excel file's name and deletes the first row. benny Excel Programming 0 June 26th 07 07:14 PM


All times are GMT +1. The time now is 06:47 AM.

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

About Us

"It's about Microsoft Excel"