Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSTab within vb6

Posted on 1998-11-30
3
Medium Priority
?
1,184 Views
Last Modified: 2008-02-20
I'm using a case statement within my sstab_click routine. But when I click on the tabs I get a different case statement each time, How do I know which current tab I am on within the sub if it changes all the time. Or how do I make them so that they wont change.

code:

Private sub sstab_click(currenttab as integer)
dim tabrte as integer
tabrte = currenttab
select case tabrte
     case 0
        action statements
     case 1
        action statements
     case 2
        action statements
end select
exit sub

0
Comment
Question by:MaryD
3 Comments
 
LVL 2

Expert Comment

by:trillo
ID: 1447528
Hmm... I thaugth that the click event had the previousTab as it's parameter, not the CurrentTab.... (i'm using VB4, so this may have changed).
You can retrieve the currentTab by calling the "Tab" property of the SSTab control. this property returns the index of the current Tab.

Tell me what happened

Trillo
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
ID: 1447529
Use the tab property to find the currently selected tab.

Private Sub SSTab1_Click(PreviousTab As Integer)
    Select Case SSTab1.Tab
    End Select
End Sub

0
 

Author Comment

by:MaryD
ID: 1447530
Trillo, actually it does have previous tab, I was just trying to get this to work. It didn't seem to work with the previous either. I did finaly use an if statement witht he .tab = 0, 1, or 2 and that seemed to work. I'll change it back to a case statement and do what Mirkwood suggested.  Thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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 …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses

885 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