Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TabStrip ZOrder setting

Posted on 2007-03-21
2
Medium Priority
?
313 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
[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
  • 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 2000 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…
Suggested Courses

705 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