473,626 Members | 3,234 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!
Sep 12 '08 #1
0 1019

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
3674
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
4389
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
7674
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.
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
958
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
8269
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
8203
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8368
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
8512
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...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2630
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
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
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.