Solved

TabStrip ZOrder setting

Posted on 2007-03-21
2
305 Views
Last Modified: 2010-05-18
I am using Visual Basic 6.
I have a tabstrip (SSTab1) with 9 tabs.
I want to have the 1st tab as the default tab no matter where I was when I compiled the program.
Looking at the help file it looks like I can use Zorder to do this but I can not get it to work.
How do I use the code and where does it have to be placed.?
Also is it possible to insert a fresh tab on a tabstrip between two previously coded tabs?
0
Comment
Question by:SINCO
  • 2
2 Comments
 
LVL 1

Expert Comment

by:scottmichael2
ID: 18766411
This should work...
Private Sub Form_Load()
    TabStrip1.Tabs(1).Selected = True
End Sub

Right click the TabStrip control and select Properties.  Use arrow buttons on Tabs tab to scroll to the tab to the left of the one you want to add (if you want a tab between tab 2 and tab3 then scroll to tab 2).  Click Insert Tab.  This will place the new tab right after the previously selected tab.
0
 
LVL 1

Accepted Solution

by:
scottmichael2 earned 500 total points
ID: 18766477
Oops - wrong tab control - sorry.  This is how you get it to select the 1st tab every time:
Private Sub Form_Load()
    SSTab1.Tab = 1
End Sub

Unfortunately, I don't think there is a way to insert a new tab in the middle with this particular tab control.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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