cassidybklyn
Programmer
Hello everyone,
I need your assistance: I am runing VB 6.0.
I created a spreadsheet from access table. Everything is working fine, except that I am generating both Total and count, but when I print the spreadsheet, the count prints on one page and the total prints on the next page. How can I get both the count and Total to print or lined up on same page?
Here is my code:
================
With xlApp
.Selection.Subtotal GroupBy:=7, TotalList:=Array(7), PageBreaks:=True, _
Function:=xlCount, SummaryBelowData:=True
.Selection.Subtotal TotalList:=Array(4), _
Function:=xlSum, SummaryBelowData:=True, Replace:=False
End With
Here is my page Setup for the spreadsheet:
==========================================
With ActiveSheet.PageSetup
.Order = xlOverThenDown
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.PrintTitleRows = ActiveSheet.Rows("1:1").Address
.PrintGridlines = True
.CenterHeader = "&""Arial,Bold""*** UNCLAIMED CHECKS OLDER THAN 60 DAYS ***"
.CenterFooter = "Page &P of &N"
End With
Thanks.
Cassidy.
I need your assistance: I am runing VB 6.0.
I created a spreadsheet from access table. Everything is working fine, except that I am generating both Total and count, but when I print the spreadsheet, the count prints on one page and the total prints on the next page. How can I get both the count and Total to print or lined up on same page?
Here is my code:
================
With xlApp
.Selection.Subtotal GroupBy:=7, TotalList:=Array(7), PageBreaks:=True, _
Function:=xlCount, SummaryBelowData:=True
.Selection.Subtotal TotalList:=Array(4), _
Function:=xlSum, SummaryBelowData:=True, Replace:=False
End With
Here is my page Setup for the spreadsheet:
==========================================
With ActiveSheet.PageSetup
.Order = xlOverThenDown
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.PrintTitleRows = ActiveSheet.Rows("1:1").Address
.PrintGridlines = True
.CenterHeader = "&""Arial,Bold""*** UNCLAIMED CHECKS OLDER THAN 60 DAYS ***"
.CenterFooter = "Page &P of &N"
End With
Thanks.
Cassidy.