PrintTitleRows

S

SteveDB1

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.
 
J

Jim Cone

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



"SteveDB1"
<[email protected]>
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.
 
J

Jim Cone

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



"SteveDB1"
<[email protected]>
wrote in message
Thank you Jim.
exactly what the doctor ordered.....
 
S

SteveDB1

please tell Luca to send me the bill <vbg>



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



"SteveDB1"
<[email protected]>
wrote in message
Thank you Jim.
exactly what the doctor ordered.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top