+ Reply to Thread
Results 1 to 2 of 2

Tabstrip tabs entered programmatically disappear after form unload

  1. #1
    cumchee
    Guest

    Tabstrip tabs entered programmatically disappear after form unload

    Hi,
    I can enter tabs into a tabstrip programmatically with no problem, but when
    I open the form after closing it, the added tabs are not there. I'm using XP
    SP2 and Excel 2003. Code as follows:
    Sub AddTabs()
    Dim TestStrip As TabStrip
    Dim TabCounter As Integer
    Dim TestTab As Object

    TabCounter = 0
    Do While Worksheets("Stocks").Cells(21 + TabCounter, 11).Value <> ""
    Set TestStrip = Form1.TabStrip1
    Set TestTab = TestStrip.Tabs.Add("MyTab" & TabCounter + 1, "MyTab" &
    TabCounter + 1, TabCounter)
    TabCounter = TabCounter + 1
    Loop
    End Sub

    Thanks in advance!
    Steve

  2. #2
    Tom Ogilvy
    Guest

    Re: Tabstrip tabs entered programmatically disappear after form unload

    Examine this code example and see how John uses the designer property:

    http://j-walk.com/ss/excel/tips/tip76.htm

    --
    Regards,
    Tom Ogilvy

    "cumchee" <cumchee@discussions.microsoft.com> wrote in message
    news:74D5838E-58D8-40C0-8C68-F0E3DC8FB567@microsoft.com...
    > Hi,
    > I can enter tabs into a tabstrip programmatically with no problem, but

    when
    > I open the form after closing it, the added tabs are not there. I'm using

    XP
    > SP2 and Excel 2003. Code as follows:
    > Sub AddTabs()
    > Dim TestStrip As TabStrip
    > Dim TabCounter As Integer
    > Dim TestTab As Object
    >
    > TabCounter = 0
    > Do While Worksheets("Stocks").Cells(21 + TabCounter, 11).Value <> ""
    > Set TestStrip = Form1.TabStrip1
    > Set TestTab = TestStrip.Tabs.Add("MyTab" & TabCounter + 1, "MyTab"

    &
    > TabCounter + 1, TabCounter)
    > TabCounter = TabCounter + 1
    > Loop
    > End Sub
    >
    > Thanks in advance!
    > Steve




+ 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