Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Macro to setup Rows to Repeat at the Top

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven - 19 Mar 2008 16:18 GMT
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
Joel - 19 Mar 2008 17:27 GMT
With ActiveSheet.PageSetup
       .PrintTitleRows = "$1:$2"
   End With

> 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
[quoted text clipped - 13 lines]
>
> Steven
Steven - 19 Mar 2008 17:39 GMT
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
JP - 24 Mar 2008 22:41 GMT
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

> 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
[quoted text clipped - 4 lines]
>
> Steven
JP - 19 Mar 2008 17:37 GMT
With ActiveSheet.PageSetup
       .PrintTitleRows = Selection.Areas(1).Address
   End With

> 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
[quoted text clipped - 13 lines]
>
> Steven
Steven - 19 Mar 2008 18:43 GMT
Great, Thank you.

>     With ActiveSheet.PageSetup
>         .PrintTitleRows = Selection.Areas(1).Address
[quoted text clipped - 17 lines]
> >
> > Steven
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.