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.
you can check using the following line:
If Me.MultiPage1.SelectedItem.Name = "Details" Then ' ' your code ' End If
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)
Thank you gentlemen. Both of your solutions work.
SOLVED
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks