943,752 Members | Top Members by Rank

Ad:
Dec 5th, 2008
0

Dynamic setting of Headers

Expand Post »
hi,

Through VB i want to set the first 3 rows of my excel sheet as HEADER so that those 3 rows will be common header for all the pages when i print them.

Regards,
Dinil
Similar Threads
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008
Dec 16th, 2008
0

Dynamic setting of Headers

PLESE help me with the above post
Last edited by dinilkarun; Dec 16th, 2008 at 9:59 am.
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008
Dec 16th, 2008
0

Re: Dynamic setting of Headers

    Dim Exmp As New Excel.Application
    Dim WB As Excel.Workbook
    Dim Sh As Excel.Worksheet

    Set WB = Exmp.Workbooks.Open("C:\abc.xls")
    Set Sh = WB.ActiveSheet
    Sh.PageSetup.PrintHeadings = True
    Sh.PageSetup.PrintTitleRows = "$1:$3"
    WB.Save
    Exmp.Visible = True
    Set Exmp = Nothing
Reputation Points: 26
Solved Threads: 40
Posting Whiz
aktharshaik is offline Offline
316 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: scrollbar control that is changing its colour
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Please Help!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC