Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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" skrev i melding
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
STRIP CHARACTERS rpick60 Excel Worksheet Functions 7 December 16th 07 04:39 AM
TAB STRIP icebreaker914 Excel Discussion (Misc queries) 1 April 16th 05 01:24 PM
tab strip icebreaker914 New Users to Excel 1 April 16th 05 01:24 PM
Strip Modules from Workbook - Code Organization Don L[_3_] Excel Programming 1 October 31st 03 04:29 PM
code to strip back (from the right) a directory but not the file name chrissie frisbee Excel Programming 2 September 4th 03 12:33 PM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"