+ Reply to Thread
Results 1 to 2 of 2

Contents Page

  1. #1
    Rich
    Guest

    Contents Page

    I have a large multiple tab workbook where each tab may contain 1 or more
    pages when printed out.
    Each tab is essentially a new heading
    I want to create a table of contents which automatically detects how many
    pages are in each tab and can therefore adjust the table of contents
    accordingly.
    Don't mind using a macro as I see this as the only way to go.

    I was thinking along the lines of;

    Sub Create_Table_of_Contents

    FOR Contents_Line = 1 to Last_Tab_in_Workbook
    Contents_Line_1 = Tab_1_Name
    Contents_Line_1_Page_Num = 1
    Contents_Line_2 = Tab_2_Name
    Contents_Line_2 = Count_of_Pages_in_Tab_1 + 1
    etc.
    etc.
    Next

    Most of this I can handle, but how can you tell how many pages are in a tab
    in print preview format?

    Rich

  2. #2
    Jim Cone
    Guest

    Re: Contents Page

    Rich,

    My free Excel add-in "Excel Extras" can create a Table of Contents with
    each sheet name linked to the sheet.
    It also displays the number of printable pages.
    You can download it here...
    http://www.realezsites.com/bus/primitivesoftware

    To determine the number of printable pages, you can use a single line of
    XL4 macro code, or several lines of VBA code.
    John Walkenbach shows how here...
    http://www.j-walk.com/ss/excel/tips/tip65.htm

    Jim Cone
    San Francisco, USA


    "Rich" <[email protected]>
    wrote in message...
    I have a large multiple tab workbook where each tab may contain 1 or more
    pages when printed out.
    Each tab is essentially a new heading
    I want to create a table of contents which automatically detects how many
    pages are in each tab and can therefore adjust the table of contents
    accordingly.
    Don't mind using a macro as I see this as the only way to go.

    I was thinking along the lines of;

    Sub Create_Table_of_Contents

    FOR Contents_Line = 1 to Last_Tab_in_Workbook
    Contents_Line_1 = Tab_1_Name
    Contents_Line_1_Page_Num = 1
    Contents_Line_2 = Tab_2_Name
    Contents_Line_2 = Count_of_Pages_in_Tab_1 + 1
    etc.
    etc.
    Next

    Most of this I can handle, but how can you tell how many pages are in a tab
    in print preview format?

    Rich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1