View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Need vb application to print first Worksheet in excel files

Nadia,

The macro below should do what you want.

HTH,
Bernie
MS Excel MVP

Sub PrintSummaryForUserSelectedFiles()
Dim filearray As Variant
Dim i As Integer
filearray = Application.GetOpenFilename(MultiSelect:=True)
If IsArray(filearray) Then
For i = LBound(filearray) To UBound(filearray)
Workbooks.Open filearray(i)
Worksheets("Summary").PrintOut
ActiveWorkbook.Close False
Next i
Else:
MsgBox "You clicked cancel"
End If
End Sub



"Nadia" wrote in message
...
Hi all and thanks in advance to anyone who helps me.

I have multiple excel workbooks containing 4-5 worksheets each. Each
workbook has a worksheet named "Summary" which summarizes calculations
performed on the other sheets.

I would like to design an application with a "browse" option so that I
select a folder or specific excel file and then click print so that it

will
print only the summary page for the file.

This sounds possible...i apologize if i posted this in the wrong spot.

Any help is appreciated.

--
Nadia