Link to home
Start Free TrialLog in
Avatar of MaryD
MaryD

asked on

SSTab within vb6

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

Avatar of trillo
trillo

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
ASKER CERTIFIED SOLUTION
Avatar of Mirkwood
Mirkwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MaryD

ASKER

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