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

PLESE help me with the above post

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.