Posts by XL-Dennis

    Hi,


    The problem with building up an TOC-sheet is that we can easily move from the sheet to another sheet but then we need to use another "shortcut" to move to next.


    So if You don't want to build up a VBA-solution then go with the "right-click" and if You want a VBA-solution following might be of interest, whic create a Navigation-commandbar:


    Option Explicit

    Private Sub Workbook_Open()
    On Error Resume Next
    Application.CommandBars("Navigate").Delete
    On Error GoTo 0

    With Application.CommandBars.Add("Navigate XL-Dennis", , False, True)

    With .Controls.Add(msoControlButton)
    .TooltipText = "Move Back"
    .FaceId = 1017
    .OnAction = "Move_Back"
    .BeginGroup = True
    End With

    With .Controls.Add(msoControlDropdown)
    .AddItem "Sheet1"
    .AddItem "Sheet2"
    .AddItem "Sheet3"
    .TooltipText = "SheetNavigate"
    .OnAction = "Sheet_Navigate"
    End With

    With .Controls.Add(msoControlButton)
    .TooltipText = "Move next"
    .FaceId = 1018
    .OnAction = "Move_Next"
    End With

    .Protection = msoBarNoCustomize
    .Position = msoBarFloating
    .Visible = True
    End With
    End Sub

    Private Sub Sheet_Navigate()
    Dim stActiveSheet As String

    With CommandBars.ActionControl
    stActiveSheet = .List(.ListIndex)
    End With

    Select Case stActiveSheet
    Case "Sheet1"
    Worksheets("Shee1").Activate
    Case "Sheet2"
    Worksheets("Sheet2").Activate
    Case "Sheet3"
    Worksheets("Sheet3").Activate
    End Select
    End Sub

    Private Sub Move_Back()
    On Error Resume Next
    ActiveSheet.Previous.Select
    End Sub

    Private Sub Move_Next()
    On Error Resume Next
    ActiveSheet.Next.Select
    End Sub


    Kind regards,
    Dennis

    Dreamboat,


    Well, we need to at least use HTML to get things up & running on a page :)


    However, using Web Office Components (WOC) does not per se involve JavaScript.


    The best part: we can even build custom spreadsheet functions add-ins :)


    Kind regards,
    Dennis

    Hi Ray,


    this is a little bit tricky which You have already found out.


    I use in different solutions following approach:



    Credit to Stratos Malasiotis for the API-solution.


    Kind regards,
    Dennis