Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a large collection of workbooks, and need to be able to print a specified number of each from a master workbook which looks like this: Title No. Reqd A 3 D 2 F 0 X 2 Originally, this was meant to be only one workbook, with a worksheet for each title, so I had the following code - Sub Dostuff() Dim a As String Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Integer 'Clear variable a = "" 'get number of worksheets d = Worksheets.Count 'go down the list getting the name of the worksheet and 'the amount needed For b = 2 To d a = Worksheets("Master").Cells(b, 1).Value c = Worksheets("Master").Cells(b, 2).Value 'print needed amount of worksheet Worksheets(a).PrintOut Copies:=c 'loop till end Next b End Sub This worked perfectly, but now the worksheet contents have been made into individual workbooks (all stored in the same folder, and with names corresponding to the 'Title' column on the master document). What changes do I need to make to the above code to work with seperate workbooks? Or do I need to start again from scratch? -- madbloke ------------------------------------------------------------------------ madbloke's Profile: http://www.excelforum.com/member.php...o&userid=14422 View this thread: http://www.excelforum.com/showthread...hreadid=392477 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Print selected worksheets in multiple workbooks? | Excel Discussion (Misc queries) | |||
Help needed on a function for multiple workbooks from 1 main workb | Excel Worksheet Functions | |||
Print routine needed for code | Excel Worksheet Functions | |||
Print Multiple Workbooks | Excel Discussion (Misc queries) | |||
VBA code in multiple workbooks | Excel Programming |