Solved

SSTab within vb6

Posted on 1998-11-30
3
1,168 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 50 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 86
VBA filters 2 61
Modifying Conditional Format from VBA code 3 55
MS Access 03, TransferText, decimal places 8 69
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

778 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