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
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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks