ExcelBanter

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

Dr. M

.PrintTitleRows
 
Hello! I am having trouble with getting .PrintTitleRows to take a variable I
create that is equal to the row number I need. So instead of having:

.PrintTitleRows="$1:$1"

row_num = ActiveCell.Row
With ActiveSheet.PageSetup
.PrintTitleRows = row_num & row_num

only this does not work!! Any suggestions? Thanks in advance.

--
Dr. M

JE McGimpsey

.PrintTitleRows
 
row_num & row_num produces "11". One way:

.PrintTitleRows = ActiveCell.EntireRow.Address

In article ,
"Dr. M" wrote:

Hello! I am having trouble with getting .PrintTitleRows to take a variable I
create that is equal to the row number I need. So instead of having:

.PrintTitleRows="$1:$1"

row_num = ActiveCell.Row
With ActiveSheet.PageSetup
.PrintTitleRows = row_num & row_num

only this does not work!! Any suggestions? Thanks in advance.


Doug[_13_]

.PrintTitleRows
 
Hi

Try

..PrintTitleRows = "$" & row_num & ":" & "$" & row_num


Doug


Dr. M wrote in message
...
Hello! I am having trouble with getting .PrintTitleRows to take a variable

I
create that is equal to the row number I need. So instead of having:

.PrintTitleRows="$1:$1"

row_num = ActiveCell.Row
With ActiveSheet.PageSetup
.PrintTitleRows = row_num & row_num

only this does not work!! Any suggestions? Thanks in advance.

--
Dr. M





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

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