Solved

Add tabs to sstab control at runtime

Posted on 2003-11-08
3
546 Views
Last Modified: 2013-12-26
How do I add tabs to an SStab control in VB6 at runtime? I have the SStab control added to my form, named SSTab1, which has 3 tabs and I'd like to add a fourth.

I tried this to no avail:

Load SSTab1.Tabs(4)



Also, how do I determine the total number of current tabs at runtime? I would expect something like this, but haven't been able to find anything that works:

intNumofTabs = SSTab1.Tabs.Count


0
Comment
Question by:josephfluckiger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 30 total points
ID: 9708794
Private Sub Command1_Click()

' get # of tabs
MsgBox SSTab1.Tabs

' change TabsPerRow and Tabs property
SSTab1.TabsPerRow = 5
SSTab1.Tabs = 4

End Sub
0
 
LVL 5

Assisted Solution

by:jayeshshah
jayeshshah earned 20 total points
ID: 9709232
Private Sub Command1_Click()
    SSTab1.Tabs = SSTab1.Tabs + 1
    SSTab1.Tab = SSTab1.Tabs - 1
End Sub


K'Regards

Jayesh
0
 
LVL 1

Author Comment

by:josephfluckiger
ID: 9709652
Beauty. Thanks both. The first answer by vinnyd79 shows how to create a 4th tab, and increase the number of tabs per row, so that all 5 tabs show up on the same row.

The second answer by jayeshshah shows how create one more tab than the current number of tabs and how to activate the tab created. Both solutions were helpful.

Now I see why vinnyd79 has so many points, that was quick!

josephfluckiger
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access Search and Replace Using VBA 6 106
Determine Range to Select 5 64
IF ELSE Statement in Excel Macro VBA 16 104
Publisher:   Unknown     VB.exe Application 1 32
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question