ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing fixed columns and rows (https://www.excelbanter.com/excel-programming/285690-printing-fixed-columns-rows.html)

rcorona106

Printing fixed columns and rows
 
Hi,

I've been working on a macro the last couple of days
trying to make it print a few columns and rows that I
want to show on every page I print. The macro works
fine the first time but after that it will not print out
the rows I want it to print on every page. Any help will
be greatly appreciated.

Thanks.

Ron de Bruin

Printing fixed columns and rows
 
Please more information

Show us your code rcorona106.
We can help you then

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"rcorona106" wrote in message ...
Hi,

I've been working on a macro the last couple of days
trying to make it print a few columns and rows that I
want to show on every page I print. The macro works
fine the first time but after that it will not print out
the rows I want it to print on every page. Any help will
be greatly appreciated.

Thanks.




No Name

Printing fixed columns and rows
 
Ok, here is part of the code. The rest of :

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$7"
.PrintTitleColumns = "$A:$E"
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$43"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
Rows("10:24").Select
Selection.EntireRow.Hidden = True
Columns("H:J").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll ToRight:=9
Columns("U:AD").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SelectedSheets.PrintPreview
End Sub


As you can see, there are lots of columns in this
spreadsheet. The macro seems to be working fine until I
run it again. The initial print preview shows me exactly
what I want to print out but as soon as I try to run the
macro again I lose the columns a-e and rows 1-7 from the
print range.

-----Original Message-----
Please more information

Show us your code rcorona106.
We can help you then

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"rcorona106" wrote

in message ...
Hi,

I've been working on a macro the last couple of days
trying to make it print a few columns and rows that I
want to show on every page I print. The macro works
fine the first time but after that it will not print

out
the rows I want it to print on every page. Any help

will
be greatly appreciated.

Thanks.



.


Ron de Bruin

Printing fixed columns and rows
 
Hi

I think the first link on my print page is a better option for you
http://www.rondebruin.nl/print.htm#non-contiguous


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



wrote in message ...
Ok, here is part of the code. The rest of :

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$7"
.PrintTitleColumns = "$A:$E"
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$43"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
Rows("10:24").Select
Selection.EntireRow.Hidden = True
Columns("H:J").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll ToRight:=9
Columns("U:AD").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SelectedSheets.PrintPreview
End Sub


As you can see, there are lots of columns in this
spreadsheet. The macro seems to be working fine until I
run it again. The initial print preview shows me exactly
what I want to print out but as soon as I try to run the
macro again I lose the columns a-e and rows 1-7 from the
print range.

-----Original Message-----
Please more information

Show us your code rcorona106.
We can help you then

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"rcorona106" wrote

in message ...
Hi,

I've been working on a macro the last couple of days
trying to make it print a few columns and rows that I
want to show on every page I print. The macro works
fine the first time but after that it will not print

out
the rows I want it to print on every page. Any help

will
be greatly appreciated.

Thanks.



.




Roy[_5_]

Printing fixed columns and rows
 
Thanks for your help.
-----Original Message-----
Hi

I think the first link on my print page is a better

option for you
http://www.rondebruin.nl/print.htm#non-contiguous


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



wrote in message

...
Ok, here is part of the code. The rest of :

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$7"
.PrintTitleColumns = "$A:$E"
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AF$43"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
Rows("10:24").Select
Selection.EntireRow.Hidden = True
Columns("H:J").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll ToRight:=9
Columns("U:AD").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.SelectedSheets.PrintPreview
End Sub


As you can see, there are lots of columns in this
spreadsheet. The macro seems to be working fine until

I
run it again. The initial print preview shows me

exactly
what I want to print out but as soon as I try to run

the
macro again I lose the columns a-e and rows 1-7 from

the
print range.

-----Original Message-----
Please more information

Show us your code rcorona106.
We can help you then

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"rcorona106"

wrote
in message news:013501c3c4cc$811c3db0

...
Hi,

I've been working on a macro the last couple of days
trying to make it print a few columns and rows that

I
want to show on every page I print. The macro

works
fine the first time but after that it will not print

out
the rows I want it to print on every page. Any help

will
be greatly appreciated.

Thanks.


.



.



All times are GMT +1. The time now is 10:22 AM.

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