Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Ranges based on conditions Courtney Excel Discussion (Misc queries) 0 July 16th 08 06:04 PM
VBA Script to Print several named ranges to PDF with cell-defined filenames jbmessamore Excel Programming 0 July 14th 06 03:34 PM
Change Named Cell ranges based upon value of another cell? fedude Excel Programming 4 May 17th 06 02:19 PM
is it possible to change print ink color based on cell value? Dave The Mechanic Excel Discussion (Misc queries) 1 January 5th 05 10:54 PM
print range based on cell input john Excel Programming 3 May 30th 04 12:28 PM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"