Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have the following macro (i got from somewhere) that opens and prints the excel files that i open in a common folder: Public Sub PrintWorkbook() Dim i As Integer Dim FileNames As Variant FileNames = Application.GetOpenFilename(, , "Choose workbooks", , True) If IsArray(FileNames) Then For i = 1 To UBound(FileNames) Workbooks.Open FileNames(i) ActiveWorkbook.ActiveSheet.PrintOut ActiveWorkbook.Close (False) Next i End If End Sub What i want to do is open files that are located in different folders and print them, what should i add to this program? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I update 2 or 3 duplicate workbooks in separate folders? | Excel Discussion (Misc queries) | |||
Need to Export All Worksheets from All Workbooks in Folder to Separate FIles not as CSV Files | Excel Programming | |||
Open Separate Excel Files in Separate Windows | Excel Discussion (Misc queries) | |||
Files\folders in VBA | Excel Programming | |||
Open Excel files in separate sessions, not just separate windows? | Excel Discussion (Misc queries) |