Results 1 to 4 of 4

Thread: [RESOLVED] Me.Caption and SSTab / Case

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Resolved [RESOLVED] Me.Caption and SSTab / Case

    I am on another project now. This is what I am looking to do:

    I am using SSTab that has TWO tabs. One is 0 and the other is 1.

    When you click on the SSTab where the current tab is 0 I would like to place in Me.Caption

    "English - Irish Gaelic Tranlator."

    When you click on the other tab (1)

    Then to display in the Me.Caption

    "Béarla - Gaeilge aistritheoir"

    Please advise.
    Last edited by BrailleSchool; May 7th, 2005 at 01:46 AM.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Me.Caption and SSTab / Case

    VB Code:
    1. Private Sub SSTab1_Click(PreviousTab As Integer)
    2.     Select Case SSTab1.Tab
    3.         Case 0
    4.             Me.Caption = "English - Irish Gaelic Translator."
    5.         Case 1
    6.             Me.Caption = "Béarla - Gaeilge aistritheoir"
    7.     End Select
    8. End Sub
    Just make sure you have the correct caption from start as well.

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Me.Caption and SSTab / Case

    You can use the SSTab's Click Event, have a look at the link below:

    http://msdn.microsoft.com/library/de...clickmstab.asp

    That event has one perameter, that indicated the index of which tab was just clicked

    VB Code:
    1. Private Sub ObjectName_Click(PreviousTab As Integer)
    2.     Select Case ObjectName.Tab
    3.         Case 0
    4.             Me.Caption = "English - Irish Gaelic Translator."
    5.         Case 1
    6.             Me.Caption = "Béarla - Gaeilge aistritheoir"
    7.     End Select
    8. End Sub

    Edit: Joacim Andersson Beat me too it

    Hope that helps,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: Me.Caption and SSTab / Case

    Quote Originally Posted by sciguyryan
    You can use the SSTab's Click Event, have a look at the link below:

    http://msdn.microsoft.com/library/de...clickmstab.asp

    That event has one perameter, that indicated the index of which tab was just clicked

    VB Code:
    1. Private Sub ObjectName_Click(PreviousTab As Integer)
    2.     Select Case ObjectName.Tab
    3.         Case 0
    4.             Me.Caption = "English - Irish Gaelic Translator."
    5.         Case 1
    6.             Me.Caption = "Béarla - Gaeilge aistritheoir"
    7.     End Select
    8. End Sub

    Edit: Joacim Andersson Beat me too it

    Hope that helps,

    RyanJ
    I thought it would have been something like it. When I was trying it for myself, was totally messing up on the syntax haha. Thanks guys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width