Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make a Tab Control Invisible

Status
Not open for further replies.

cforput

Programmer
Feb 28, 2007
5
US
Hi all. I have a form with a tab control on it (and 4 tabs or pages). By default, the tab control is invisible. I have a button on the main form that makes the tab control visible (me.TabCtrlUtiliities.Visible = True). Works great. What I can't do is figure out a way to have a button on any of the tab pages that changes the tab control back to invisible. I can get it to work with a button on the main from but not from a button on any of the pages in the tab control itself. I have tried setting the focus back out to the main form and then tried to change the tab control back to invisible but that doesn't work either. Any ideas? I'm a total novice at VBA stuff. Can you tell?

Thanks
Craig
 
I have tried setting the focus back out to the main form

How? If you've actually tried setting focus on the main form, it'll fail; a form can only receive focus if it has no controls on it. Instead, try returning focus to some object on the main form instead and then make the tabbed control invisible.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top