ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a macro to select a print range (https://www.excelbanter.com/excel-programming/360252-using-macro-select-print-range.html)

mrc1986 via OfficeKB.com

Using a macro to select a print range
 
What I have is a count function that counts the range A42:A100 in cell Z3 on
a sheet called "Start". What I am trying to do is based on that count
function to select a range that I have defined (tag1,tag2,....tag8) on a a
sheet calld "Lables" and print it based on the results of the count function
in cell Z3. I am hoping to be able to do this in a macro.
Any help will be very appreciated

Thank You

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1

Tom Ogilvy

Using a macro to select a print range
 
With worksheets("Start")
set rng = .Range("Z3")
End with
i = rng.value
with worksheets(Lables")
set rng1 = .Range("tag" & i)
.PageSetup.PrintArea = "Lables!" & rng1.Address(1,1)
.Printout
End with

--
Regards,
Tom Ogilvy



"mrc1986 via OfficeKB.com" wrote:

What I have is a count function that counts the range A42:A100 in cell Z3 on
a sheet called "Start". What I am trying to do is based on that count
function to select a range that I have defined (tag1,tag2,....tag8) on a a
sheet calld "Lables" and print it based on the results of the count function
in cell Z3. I am hoping to be able to do this in a macro.
Any help will be very appreciated

Thank You

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1


mrc1986 via OfficeKB.com

Using a macro to select a print range
 
This is exaclatally what I am trying to do. There is only one little problem
it always prints out on two pages nomatter which range it is printing. For
the most part it should only need one page.

Thank You,
Mark

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1

mrc1986 via OfficeKB.com

Using a macro to select a print range
 
I found my peoblem ids had some odd formatting in that worksheet. I put all
the info in a different worksheet and it works perfectly.


THAK YOU!!!!

mrc1986 wrote:
This is exaclatally what I am trying to do. There is only one little problem
it always prints out on two pages nomatter which range it is printing. For
the most part it should only need one page.

Thank You,
Mark


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com