PDA

View Full Version : Show / Hide part of Tabstrip or Multipage



craigos
06-09-2012, 10:50 AM
Hi All,

Can anyone tell me how to show (or hide) part of a Tabstrip / MultiPage on a UF when a command buton is selected.

What I am after is something similar to the Ctrl+F function that shows the Find / Replace UF and there is an Options>> button on there that shows additional comboboxes etc.

I have searched for a solution but may be using the wrong key words to get an answer.

Many Thanks

Craig

mikerickson
06-09-2012, 11:27 AM
You can adjust the .Width and .Height of the MultiPage.
Private Sub CommandButton1_Click()
Dim newWidth As Single

With CommandButton1
If .Caption = "More >>" Then
.Caption = "<< Less"
newWidth = 200
Else
.Caption = "More >>"
newWidth = 100
End If
End With

MultiPage1.Width = newWidth
End Sub

craigos
06-09-2012, 11:51 AM
Hi mikerickson,

Excellent....Thank you, just did a test with the height option using your attachment...perfect.

Thanks Again

Craig

CodeNinja
06-10-2012, 06:31 AM
Are you looking for something like :


Private Sub CommandButton1_Click()
If UserForm1.TabStrip1.Visible = True Then
UserForm1.TabStrip1.Visible = False
Else
UserForm1.TabStrip1.Visible = True
End If



End Sub

craigos
06-10-2012, 11:42 AM
CodeNinja,

Brill.... I can use that method as well.

Many Thanks

Craig :thumb