+ Reply to Thread
Results 1 to 4 of 4

Thread: Multipage Tab References

  1. #1
    Registered User
    Join Date
    06-29-2010
    Location
    Manassas VA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Multipage Tab References

    Multipage control / 2 tabs [Main / Detail]

    Everything is working fine using the Change event but....

    When user clicks Detail tab routine should run. When user clicks the Main tab it need not. How do I specifically check which tab has been clicked or which is the active tab? I have tried referring to multipage.name but that returns the name of the multipage control itself and not the tab.

    Help is appreciated.
    Last edited by grinnz; 06-12-2011 at 01:06 PM.

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    409

    Re: Multipage Tab References

    you can check using the following line:
    If Me.MultiPage1.SelectedItem.Name = "Details" Then
        '
        '  your code
        '
    End If

  3. #3
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: Multipage Tab References

    The Tabs have an Index, note it starts at zero. Assuming "Details" is Page 2 (Index 1)

    Option Explicit
    
    Private Sub MultiPage1_Change()
    If Me.MultiPage1.Value = 1 Then MsgBox "Details"
    End Sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  4. #4
    Registered User
    Join Date
    06-29-2010
    Location
    Manassas VA
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Multipage Tab References

    Thank you gentlemen. Both of your solutions work.

    SOLVED

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0