ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PrintTitleRows (https://www.excelbanter.com/excel-programming/425403-printtitlerows.html)

SteveDB1

PrintTitleRows
 
In Page Set Up from the printer/page set up command, there's an option on
the last tab to determine which rows/columns you want repeated on each page
of the print out.
I've presently got mine set to blank in a macro that I've made. I.e.,

With ActiveSheet.PageSetUp
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With

What I want is something that will look at some attribute, or property of
the worksheet that can set the PrintTitleRows for me when I activate the
macro. I am aware I can use an application.inputbox, but prefer not to.

My thinking was that I can/should be able to use the color index or some
other atribute/property to set the PrintTitleRows to that location.
I.e., something like....

if colorindex < -4142 then
set ActiveSheet.PageSetUp.PrintTitleRows = $1:$???

With ActiveSheet.PageSetUp
.PrintTitleRows = "$1:$???"
.PrintTitleColumns = ""
End With

I've just tried

if selection.colorindex < -4142 then

and it throws a 438 error.

So, if I cannot use that, what would I use?

Thank you.


Jim Cone[_2_]

PrintTitleRows
 
If Selection(1).Interior.ColorIndex = -4142
--
Jim Cone
Portland, Oregon USA



"SteveDB1"

wrote in message
In Page Set Up from the printer/page set up command, there's an option on
the last tab to determine which rows/columns you want repeated on each page
of the print out.
I've presently got mine set to blank in a macro that I've made. I.e.,

With ActiveSheet.PageSetUp
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With

What I want is something that will look at some attribute, or property of
the worksheet that can set the PrintTitleRows for me when I activate the
macro. I am aware I can use an application.inputbox, but prefer not to.
My thinking was that I can/should be able to use the color index or some
other atribute/property to set the PrintTitleRows to that location.
I.e., something like....

if colorindex < -4142 then
set ActiveSheet.PageSetUp.PrintTitleRows = $1:$???

With ActiveSheet.PageSetUp
.PrintTitleRows = "$1:$???"
.PrintTitleColumns = ""
End With

I've just tried
if selection.colorindex < -4142 then
and it throws a 438 error.
So, if I cannot use that, what would I use?
Thank you.


SteveDB1

PrintTitleRows
 
Thank you Jim.
exactly what the doctor ordered.....


"Jim Cone" wrote:

If Selection(1).Interior.ColorIndex = -4142
--
Jim Cone
Portland, Oregon USA



"SteveDB1"

wrote in message
In Page Set Up from the printer/page set up command, there's an option on
the last tab to determine which rows/columns you want repeated on each page
of the print out.
I've presently got mine set to blank in a macro that I've made. I.e.,

With ActiveSheet.PageSetUp
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With

What I want is something that will look at some attribute, or property of
the worksheet that can set the PrintTitleRows for me when I activate the
macro. I am aware I can use an application.inputbox, but prefer not to.
My thinking was that I can/should be able to use the color index or some
other atribute/property to set the PrintTitleRows to that location.
I.e., something like....

if colorindex < -4142 then
set ActiveSheet.PageSetUp.PrintTitleRows = $1:$???

With ActiveSheet.PageSetUp
.PrintTitleRows = "$1:$???"
.PrintTitleColumns = ""
End With

I've just tried
if selection.colorindex < -4142 then
and it throws a 438 error.
So, if I cannot use that, what would I use?
Thank you.



Jim Cone[_2_]

PrintTitleRows
 

You are welcome.
(please see Luca Brasi in the Billing dept. on your way out) <g
'--
Jim Cone



"SteveDB1"

wrote in message
Thank you Jim.
exactly what the doctor ordered.....




"Jim Cone" wrote:
If Selection(1).Interior.ColorIndex = -4142
--
Jim Cone
Portland, Oregon USA






"SteveDB1"

wrote in message
In Page Set Up from the printer/page set up command, there's an option on
the last tab to determine which rows/columns you want repeated on each page
of the print out.
I've presently got mine set to blank in a macro that I've made. I.e.,

With ActiveSheet.PageSetUp
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With

What I want is something that will look at some attribute, or property of
the worksheet that can set the PrintTitleRows for me when I activate the
macro. I am aware I can use an application.inputbox, but prefer not to.
My thinking was that I can/should be able to use the color index or some
other atribute/property to set the PrintTitleRows to that location.
I.e., something like....

if colorindex < -4142 then
set ActiveSheet.PageSetUp.PrintTitleRows = $1:$???

With ActiveSheet.PageSetUp
.PrintTitleRows = "$1:$???"
.PrintTitleColumns = ""
End With

I've just tried
if selection.colorindex < -4142 then
and it throws a 438 error.
So, if I cannot use that, what would I use?
Thank you.



SteveDB1

PrintTitleRows
 
please tell Luca to send me the bill <vbg



"Jim Cone" wrote:


You are welcome.
(please see Luca Brasi in the Billing dept. on your way out) <g
'--
Jim Cone



"SteveDB1"

wrote in message
Thank you Jim.
exactly what the doctor ordered.....




"Jim Cone" wrote:
If Selection(1).Interior.ColorIndex = -4142
--
Jim Cone
Portland, Oregon USA






"SteveDB1"

wrote in message
In Page Set Up from the printer/page set up command, there's an option on
the last tab to determine which rows/columns you want repeated on each page
of the print out.
I've presently got mine set to blank in a macro that I've made. I.e.,

With ActiveSheet.PageSetUp
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With

What I want is something that will look at some attribute, or property of
the worksheet that can set the PrintTitleRows for me when I activate the
macro. I am aware I can use an application.inputbox, but prefer not to.
My thinking was that I can/should be able to use the color index or some
other atribute/property to set the PrintTitleRows to that location.
I.e., something like....

if colorindex < -4142 then
set ActiveSheet.PageSetUp.PrintTitleRows = $1:$???

With ActiveSheet.PageSetUp
.PrintTitleRows = "$1:$???"
.PrintTitleColumns = ""
End With

I've just tried
if selection.colorindex < -4142 then
and it throws a 438 error.
So, if I cannot use that, what would I use?
Thank you.





All times are GMT +1. The time now is 11:05 AM.

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