tabstrip question (VB6)

Posted on 2000-02-06
Medium Priority
Last Modified: 2008-02-01
How do I programicaly select one of the tabs on a tabstrip?
On a sstab I use sstab1.Tab = 2, but I can not find i way to do it
on a tabstrip.
Question by:trondsorensen
  • 2
LVL 71

Accepted Solution

Éric Moreau earned 200 total points
ID: 2494577
Use this syntax:

TabStrip1.Tabs(2).Selected = True

Expert Comment

ID: 2494590
You need to have two public variables in that form, such as CurrentTab, PrevTab. In the Tabstrip's click event, have code something like this:
In this, you can keep a separate frame for each tabpage. When a tabpage is selected make the specific frame visible and all others invisible.

CurrentTab = Tabstrip1.SelectedItem.Index - 1

If CurrentTab <> PreviousTab then
...   'Do some process like making the frame visible & other frames invisible
PreviousTab = CurrentTab

Hope this would be useful

Author Comment

ID: 2495543
I thought it was that easy, just couldnt figure it out :-)

Author Comment

ID: 2495563
I am sorry tirupur_selva, but this is not what I was asking. Maybe it is my english wich is not as good as I like to think ;-)
I wanted to select a tab progamicaly, like if I press command1, tab1 gets selected. But thanks for your effort.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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

588 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