How to hide a Combo box appearing on 4 pages of a Tab controle??

  • Thread starter Thread starter NormanF
  • Start date Start date
N

NormanF

Hi there,

I would like to use a combo box on 2 Pages of a tab
controle. the way I have inserted the combo box has it
appear on all Page of the tab control.
What methode can I Use the either hide the combo box or is
my only other option to place one combo box on the desired
page and goon with my business??

any suggestion are much appreciated.

Regards Norman
 
You could set the Visible property of the combo in the Change event of the
tab control.

This example shows the combo for pages 1 and 4 of the tab control:

Private Sub MyTab_Change()
Dim bShow As Boolean

bShow = ((Me.MyTab = 1) Or (Me.MyTab = 4))
If Me.MyCombo.Visible <> bShow Then
Me.MyCombo.Visible = bShow
End If
End Sub
 
Norman,

It sounds like you created the combobox on the form rather than the tab control.
Click on the combobox to select it and then cut it. Click on a page of the tab
control to select it. You should see "handles" on the page. Now paste the
combobox on the page. Doing it this way places the combobox on the page. If you
didn'r do it this way, you created the combobox on the form behind the tab
control.
 
Allen!

I thought that I would have to use code in order to show
them.

Thanks again
Norman
 
Back
Top