473,623 Members | 2,433 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic Print Ranges

34 New Member
Hello, I have a workbook with ~ 20 sheets, all which upload with different data every week. We have some "old school" managers that are still requesting hard copies of each sheet.... problem for me is that the ranges per sheet can change dramatically (I.e. - from (A1:D20) to (C1:Z490).

So far I've tried to create print ranges based on the number of cell functions, and try to print, however the font in some pages can be very small... some pages will print an extra four blank pages..... so obviously not working properly.

Is there a somewhat easy code that can determine the length and width of populated cells and consistently print?

So far I've put together the following which is not working like it should:

Sub Excluded()
Sheets("Exclude d Claims").Select
ActiveSheet.Pag eSetup.PrintAre a = ([ExclusionsPrint])
With ActiveSheet.Pag eSetup
.PrintTitleRows = "$1:$7"
.PrintTitleColu mns = ""
End With
With ActiveSheet.Pag eSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.Inc hesToPoints(0.7 5)
.RightMargin = Application.Inc hesToPoints(0.7 5)
.TopMargin = Application.Inc hesToPoints(1)
.BottomMargin = Application.Inc hesToPoints(1)
.HeaderMargin = Application.Inc hesToPoints(0.5 )
.FooterMargin = Application.Inc hesToPoints(0.5 )
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoCommen ts
.PrintQuality = 600
.CenterHorizont ally = False
.CenterVertical ly = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumbe r = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Range("A1").Sel ect
ActiveWindow.Se lectedSheets.Pr intOut Copies:=1, Collate:=True
End Sub

I know it states 1 page by 1 page, however if I put 1 page by 10, it still comes out to 14+ pages, with several blank. I'm thinking theres a much easier way to accomplish this.

Thanks to anyone who can help!
Oct 6 '08 #1
0 957

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1929
by: Jason Heyes | last post by:
What can I do to circumvent the performance degradation associated with dynamic allocation and small objects? Thanks.
31
3670
by: NickName | last post by:
/* goal: dynamic evaluation of table row platform: sql 2000 */ use northwind; declare @tbl sysname set @tbl = 'customers' EXEC('select count(*) from ' +@tbl)
5
4387
by: Tompa | last post by:
Hi, I would like to create images on the fly as a response to an http request. I can do this with PIL like this (file create_gif.py): from PIL import Image, ImageDraw print 'Status: 200 OK' print 'Content-type: text/html' print print '<HTML><HEAD><TITLE>Python Dynamic Image Creation Test</TITLE></HEAD>'
2
1717
by: Ben O'Steen | last post by:
Scenario: ========= Using PyGame in particular, I am trying to write an application that will run a scripted timeline of events, eg at 5.5 seconds, play xxx.mp3 and put the image of a ball on screen, at 7.8 seconds move the ball up and down. At this point, I hear you say 'Oh, like Flash'. Yes, well... Like Flash, but I don't want to take this app in the same direction as Macromedia took Flash, nor do I (ever) want the two to be
1
17656
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
67
7673
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 4/30/06 I am looking for suggestions on how to find the date ranges where there were no transactions.
23
7394
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these in an array. The application compiles but aborts without giving me any useful information. What I suspect is happening is infinite recursion. Each Directory object creates an array of Subdirectories each of which has an array of...
4
5452
by: Bongard | last post by:
I have a dynamic range that I would like to use as a linked table into Access. The problem is that Access doesn't seem to want to to recognize the dynamic range when you click on "show named ranges" in the Link Spreadsheet wizard. The reason I want to use a dynamic range is because when the data in my excel spreadsheet changes the linked table will import blank rows that were previously used from the bottom of the spreadsheet. I can't...
0
1018
by: deve8ore | last post by:
Hello, I have a workbook with ~ 20 sheets, all which upload with different data every week. We have some "old school" managers that are still requesting hard copies of each sheet.... problem for me is that the ranges per sheet can change dramatically (I.e. - from (A1:D20) to (C1:Z490). So far I've tried to create print ranges based on the number of cell functions, and try to print, however the font in some pages can be very small... some...
0
3262
by: ebernon | last post by:
The Dynamic deletion of Rows and Columns within a program is frequently desired but often hard to obtain. The Help files for VB-6 contained within Excel 2002 (XP) don’t always provide the help you need to perform this operation. By recording a Macro, you can develop the following code snipet: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 9/16/2009 by Ebernon '
0
8227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8326
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8469
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4164
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2602
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1778
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.