Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Macro to setup Rows to Repeat at the Top

I would like to create a macro to setup Rows to Repeat at the Top based on
the current rows selected. ie I would just select the rows and I plan on
using a menu bar macro button to run the macro. Therefore the macro needs to
know to use the currently selected rows to use as the rows to repeat at the
top.

I tried something like:

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Rows
End With

but thats not it. It returns an error.

Thank you for your help,


Steven

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro to setup Rows to Repeat at the Top

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$2"
End With

"Steven" wrote:

I would like to create a macro to setup Rows to Repeat at the Top based on
the current rows selected. ie I would just select the rows and I plan on
using a menu bar macro button to run the macro. Therefore the macro needs to
know to use the currently selected rows to use as the rows to repeat at the
top.

I tried something like:

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Rows
End With

but thats not it. It returns an error.

Thank you for your help,


Steven

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Macro to setup Rows to Repeat at the Top

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Areas(1).Address
End With



On Mar 19, 11:18*am, Steven wrote:
I would like to create a macro to setup Rows to Repeat at the Top based on
the current rows selected. *ie I would just select the rows and I plan on
using a menu bar macro button to run the macro. *Therefore the macro needs to
know to use the currently selected rows to use as the rows to repeat at the
top.

I tried something like:

* * With ActiveSheet.PageSetup
* * * * .PrintTitleRows = Selection.Rows
* * End With

but thats not it. *It returns an error.

Thank you for your help,

Steven


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Macro to setup Rows to Repeat at the Top

That is not what I am looking for. That works if I want row 1 and 2. But I
want to go with the current selection top row and bottom row because it will
not always be row 1 and 2 that I want to repeat. I want to use the current
rows selected.

Thanks,

Steven
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Macro to setup Rows to Repeat at the Top

Great, Thank you.

"JP" wrote:

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Areas(1).Address
End With



On Mar 19, 11:18 am, Steven wrote:
I would like to create a macro to setup Rows to Repeat at the Top based on
the current rows selected. ie I would just select the rows and I plan on
using a menu bar macro button to run the macro. Therefore the macro needs to
know to use the currently selected rows to use as the rows to repeat at the
top.

I tried something like:

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Rows
End With

but thats not it. It returns an error.

Thank you for your help,

Steven





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Macro to setup Rows to Repeat at the Top

Who are you talking to?

Mine works no matter how many rows you select.

With ActiveSheet.PageSetup
.PrintTitleRows = Selection.Areas(1).Address
End With


--JP

On Mar 19, 12:39*pm, Steven wrote:
That is not what I am looking for. *That works if I want row 1 and 2. *But I
want to go with the current selection top row and bottom row because it will
not always be row 1 and 2 that I want to repeat. *I want to use the current
rows selected.

Thanks,

Steven


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
repeat two rows macro please jwmbem New Users to Excel 3 March 9th 08 04:02 PM
page setup won't allow entering "rows to repeat at top" jasbrow Excel Discussion (Misc queries) 1 February 11th 08 08:34 PM
Page Setup - Rows To Repeat At Top Maureen Weinberg Excel Discussion (Misc queries) 2 April 11th 07 02:56 PM
"Rows to repeat at top" option under page setup PaulandArt Excel Worksheet Functions 1 November 7th 05 02:13 PM
Macro for Page Setup - Repeat rows at top epuk Excel Programming 2 April 1st 05 04:23 AM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"