Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I change a file's properties in Excel? | Excel Discussion (Misc queries) | |||
compair 2 excel file's and import data from 1 to the other | Excel Discussion (Misc queries) | |||
opening new csv file in existing xls file's worksheet | Excel Worksheet Functions | |||
Linking from a Combo box to another excel file's specific workshee | Excel Programming | |||
Need a program that gets excel file's name and deletes the first row. | Excel Programming |