![]() |
Macros for printing
I have a worksheet with many columns in the following format:
Comp A Comp B Comp C Comp D Titles DATA The data in the worksheet is grouped into 5 levels. I would like to be able to print one of the companies at a time for any level of information I choose. Since I have about 20 companies at the top, I would like to insert a button (macro) in order to print the information for that company. So... I went to Print Setup and made the left columns repeat for any pages printed (so the titles are on all pages). I also set it to FIT TO 1 page wide and left blank the spot for pages tall (so it will automatically fit the level of information that I want at that specific time - it could be only one page or up to 6 pages tall). Now, I highlighted colums C:E, named it something like COMPA, and tried the following macro: Sub PRCOMPA() ' ' PRCOMPA Macro ' Application.Goto Reference:="COMPA" Selection.PrintOut Copies:=1, Collate:=True Range("C2").Select End Sub Problem: some of the companies correctly print 1-6 pages for whatever level of data I'm looking at (although I generally get one blank page at the end). Other companies print 300 pages - even they are all blank. Any idea what I am doing wrong?? Thanks for the assistance. |
All times are GMT +1. The time now is 02:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com