Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If someone could help me with this I'd be most grateful.
I would like to have the name of a document in A1 and the number of copies to be printed in B1. (and so on down the column) all documents, spreadsheets are formatted to fit on one page and they are all in the same directory. regards, DL |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like the following:
Dim Rng As Range Dim WB As Workbook For Each Rng In ActiveSheet.UsedRange.Columns(1).Cells Set WB = Workbooks.Open(Filename:=Rng.Text) WB.Worksheets(1).PrintOut copies:=Rng(1, 2).Value WB.Close savechanges:=False Next Rng -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mirsten Choiple" wrote in message ... If someone could help me with this I'd be most grateful. I would like to have the name of a document in A1 and the number of copies to be printed in B1. (and so on down the column) all documents, spreadsheets are formatted to fit on one page and they are all in the same directory. regards, DL |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Chip; it works beautifully,
DL "Chip Pearson" wrote in message ... Try something like the following: Dim Rng As Range Dim WB As Workbook For Each Rng In ActiveSheet.UsedRange.Columns(1).Cells Set WB = Workbooks.Open(Filename:=Rng.Text) WB.Worksheets(1).PrintOut copies:=Rng(1, 2).Value WB.Close savechanges:=False Next Rng -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mirsten Choiple" wrote in message ... If someone could help me with this I'd be most grateful. I would like to have the name of a document in A1 and the number of copies to be printed in B1. (and so on down the column) all documents, spreadsheets are formatted to fit on one page and they are all in the same directory. regards, DL |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB routine to print to PDF? | Excel Worksheet Functions | |||
Print routine needed for code | Excel Worksheet Functions | |||
How do I print a list of the documents not each document | Excel Discussion (Misc queries) | |||
How do I print a LIST of documents in a folder | Excel Discussion (Misc queries) | |||
How do I right-click print from Open documents list? | Excel Discussion (Misc queries) |