View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
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