Get tab name of active tab control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Office 2003 and Windows XP;

I need to return the name on the Tab of the currently activated tab of a Tab
Control. I hope that makes sense; e.g. If I have five tabs and the one that
is currently showing is named "Index" then I need to return "Index".

By chance, has someone got a function that will do this?

Thanks much in advance.
 
XP said:
Using Office 2003 and Windows XP;

I need to return the name on the Tab of the currently activated tab of a
Tab
Control. I hope that makes sense; e.g. If I have five tabs and the one
that
is currently showing is named "Index" then I need to return "Index".

By chance, has someone got a function that will do this?

Thanks much in advance.

Debug.Print Me.MyTabControl.Pages(Me.MyTabControl.PageIndex).Caption

(Untested. IOW made up on the spot! Ought to work, tho...)
 
XP said:
Using Office 2003 and Windows XP;

I need to return the name on the Tab of the currently activated tab of a Tab
Control. I hope that makes sense; e.g. If I have five tabs and the one that
is currently showing is named "Index" then I need to return "Index".


This will return what is displayed on the tab:

TabCtl.Pages(TabCtl).Caption

If you have not specified the Caption, then this will return
the Name of the tab page:

TabCtl.Pages(TabCtl).Name
 
Back
Top