Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print ranges based on cell value
I'm trying to create a button attached to a Macro that will print a constant
range of cells for a header, and several variable ranges depending on the value of a particular cell in each variable range, and a selection of a constant range for a footer. PROBLEM, I have read the VBA for dummies and well, its not the right book or I'm REALLY a dummy cause I cant figure out what I should be doing. Any thoughts on the code I need? Or point me in the right direction?? Thanks, John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print ranges based on cell value
John,
You will need to set the print range and then use the printout method to print the worksheet. Here is an example: Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$E$25" Worksheets("Sheet1").PrintOut Note: There are a lot of print settings that can be changed using VBA. I recommend recording a macro and then going and looking at the code that is generated for ideas. Dan "John" wrote: I'm trying to create a button attached to a Macro that will print a constant range of cells for a header, and several variable ranges depending on the value of a particular cell in each variable range, and a selection of a constant range for a footer. PROBLEM, I have read the VBA for dummies and well, its not the right book or I'm REALLY a dummy cause I cant figure out what I should be doing. Any thoughts on the code I need? Or point me in the right direction?? Thanks, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print Ranges based on conditions | Excel Discussion (Misc queries) | |||
VBA Script to Print several named ranges to PDF with cell-defined filenames | Excel Programming | |||
Change Named Cell ranges based upon value of another cell? | Excel Programming | |||
is it possible to change print ink color based on cell value? | Excel Discussion (Misc queries) | |||
print range based on cell input | Excel Programming |