![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I'm new at creating macros and would like help at writing a macro for an excel workbook that has 3 sheets. The first sheet is basically a database of values. The second and third sheets are formatted documents. I would like have the macro print sheet 2 once and sheet 3 a variable number of times depending on the value in column "F" of sheet 1. Any help would be greatly appreciated.
Thanks, Mark |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Sheets("Sheet2").PrintOut Copies:=Sheets("Sheet1").Range("F1")
Sheets("Sheet3").PrintOut Copies:=Sheets("Sheet1").Range("F1") |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Great! Thanks for the help. Now onto the next part of the problem. I figured out how to set the ActivePrinter to the special printer I want to print these out to, but how do I save what printer it was before so that I can return the printer back to what the default printer was?
Also, how would I modify the macro to loop thru several lines of information in the database (to print several sets of the reports) Thanks again! Mark |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|