Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Post Your Free Ads Here in English for Advertising .Adult and gambling websites NOT accepted. > Small Business Opportunities:

Small Business Opportunities: This section is for posting your free classified ads about different work at home and home based business opportunities. NO PORN ALLOWED!

Reply
 
Thread Tools Display Modes
Old 05-19-2011, 07:12 PM   #1
bushufusi551
 
Posts: n/a
Default Windows 7 Ultimate Key Creating a TOC with Hyperli

Today's author is Dennis Wallentin,Office Professional 2007, XL-Dennis, of A few weeks ago we posted a code example for creating a table of contents for your workbook. Dennis offers another approach with this code sample for creating a TOC with hyperlinks. Dennis’ code uses the PageSetup.Pages().Count property, introduced in Excel 2007, to calculate the number of pages on each sheet. In addition, the entries in the TOC link to their respective sheets to improve on-screen workbook navigation. Option Explicit Sub Create_TOC()
Dim wbBook As Workbook
Dim wsActive As Worksheet
Dim wsSheet As Worksheet Dim lnRow As Long
Dim lnPages As Long
Dim lnCount As Long Set wbBook = ActiveWorkbook With Application
    .DisplayAlerts = False
    .ScreenUpdating = False
End With 'If the TOC sheet already exist delete it and add a new
'worksheet. On Error Resume Next
With wbBook
    .Worksheets("TOC").Delete
    .Worksheets.Add Before:=.Worksheets(1)
End With
On Error GoTo 0 Set wsActive = wbBook.ActiveSheet
With wsActive
    .Name = "TOC"
    With .Range("A1:B1")
        .Value = VBA.Array("Table of Contents",Office 2010 Key, "Sheet # - # of Pages")
        .Font.Bold = True
    End With
End With lnRow = 2
lnCount = 1 'Iterate through the worksheets in the workbook and create
'sheetnames,Windows 7 Ultimate Key, add hyperlink and count & write the running number
'of pages to be printed for each sheet on the TOC sheet.
For Each wsSheet In wbBook.Worksheets
    If wsSheet.Name <> wsActive.Name Then
        wsSheet.Activate
        With wsActive
            .Hyperlinks.Add .Cells(lnRow, 1),Office Professional Plus 2010, "", _
            SubAddress:="'" & wsSheet.Name & "'!A1", _
            TextToDisplay:=wsSheet.Name
            lnPages = wsSheet.PageSetup.Pages().Count
            .Cells(lnRow,Windows 7 Activation, 2).Value = "'" & lnCount & "-" & lnPages
        End With
        lnRow = lnRow + 1
        lnCount = lnCount + 1
    End If
Next wsSheet wsActive.Activate
wsActive.Columns("A:B").EntireColumn.AutoFit With Application
    .DisplayAlerts = True
    .ScreenUpdating = True
End With End Sub <div
  Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:53 PM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum