Link to home
Start Free TrialLog in
Avatar of Xavior2K3
Xavior2K3

asked on

Moving tab pages

Hi,

Is there a way to move tab pages around on the tab control.  I have about 10 tab pages and according to a checkbox i want to make one of the middle ones disappear and be replaced by another one, but the others to stay the same.  How can this be done?

Regards,
Michael
Avatar of iboutchkine
iboutchkine

Dim colRemovedTabs As New Collection()
TabPage1 = TabControl1.TabPages(1)
colRemovedTabs.Add(TabPage1,  
    TabPage1.Name)
TabControl1.Controls.Remove(TabPage1)

For adding the control back:

TabControl1.Controls.Add(colRemovedTabs("TabPage2"))
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

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 Xavior2K3

ASKER

Thanks, just what im looking for!