Solved

SSTab within vb6

Posted on 1998-11-30
3
1,166 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
Comment Utility
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 50 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now