Tabstrip tabs entered programmatically disappear after form unload

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top