View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Variable rows to repeat

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


A good approach is to turn on the macro recorder, then set the page setup
and print area settings manually. Then turn it off and look at the code.
Eliminate the lines that will default and that you don't need to set -
otherwise, each line executes as a separate command and can take a lot of
time.


--
Regards,
Tom Ogilvy



"mkferrara" wrote:

I am creating a macro to reformat data pulled into Excel from a csv file.
It contains various data at the beginning of the report, followed by column
headings and data. The column heading row is not a constant because the info
at the beginning of the report is variable. I want only the column headings
and data to appear on subsequent pages. I can search and locate the column
headings and select them. How do I get this row (or cells) that I've
selected into the PrintTitleRow for subsequent pages?
--
mkferrara