+ Reply to Thread
Results 1 to 3 of 3

TAB STRIP CODE

  1. #1
    icebreaker914
    Guest

    TAB STRIP CODE

    I AM TRYING TO WRITE VBA CODE FOR A TAB STRIP THAT CONTAINS FOUR TABS WITH
    THE SELECTION TO BE DISPLAYED IN A GIVEN CELL LOCATION. CAN ANYONE HELP ME
    OUT?
    --
    icebreaker914



    --
    icebreaker914

  2. #2
    Fadi Chalouhi
    Guest

    Re: TAB STRIP CODE

    Hi,

    the attached code will insert 3 worksheets to your workbook and rename
    them based on the contents of cells A1:A3 of your active sheet. The
    code is basic but it should put you in the right direction.

    Sub InsertSheets()
    '
    Dim WsCurrent As Worksheet

    Set WsCurrent = ActiveSheet
    Sheets.Add After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = WsCurrent.Range("A1").Value
    Sheets.Add After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = WsCurrent.Range("A2").Value
    Sheets.Add After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = WsCurrent.Range("A3").Value
    End Sub

    HTH

    Fadi
    www.chalouhis.com/XLBLOG


  3. #3
    Harald Staff
    Guest

    Re: TAB STRIP CODE

    Private Sub TabStrip1_Change()
    Call TabStrip1_Click(TabStrip1.SelectedItem.Index)
    End Sub

    Private Sub TabStrip1_Click(ByVal Index As Long)
    Sheets(1).Range("C14").Value = TabStrip1.SelectedItem.Index
    Sheets(1).Range("C15").Value = TabStrip1.SelectedItem.Caption
    End Sub

    HTH. Best wishes Harald

    "icebreaker914" <[email protected]> skrev i melding
    news:[email protected]...
    > I AM TRYING TO WRITE VBA CODE FOR A TAB STRIP THAT CONTAINS FOUR TABS WITH
    > THE SELECTION TO BE DISPLAYED IN A GIVEN CELL LOCATION. CAN ANYONE HELP

    ME
    > OUT?
    > --
    > icebreaker914
    >
    >
    >
    > --
    > icebreaker914




+ 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