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

x
?
Solved

SSTab within vb6

Posted on 1998-11-30
3
Medium Priority
?
1,178 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
[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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…
Suggested Courses

722 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