Multipage/Multitab user form

J

Jeffery B Paarsa

Hello,

I have a Multipage/Multitab userform that have set the visible=false for the
last page/tab... So usually only 3 tab/pages are visible on this user form...
upon checking of a checkbox on thrid page I would like to make the
hidden/invisible page/tab to visible=True and collect some more data from the
newly visible page/tab and then after that make that page invisible again...
How can I do that?
 
J

Jean-Guy Marcil

Jeffery B Paarsa said:
Hello,

I have a Multipage/Multitab userform that have set the visible=false for the
last page/tab... So usually only 3 tab/pages are visible on this user form...
upon checking of a checkbox on thrid page I would like to make the
hidden/invisible page/tab to visible=True and collect some more data from the
newly visible page/tab and then after that make that page invisible again...
How can I do that?

Instead of using a checkbox, I would use a CommandButton. Otherwise, you
have to handle the fact that the checkbox will remain checked...

I would display the fourth page and hide the other 3. This fourth page would
have a button to return to the other 3 pages once we are done with it. The
code for the two buttons would be something like (Note that the Pages
collection in a MultiPage object are index at 0):

Private Sub CommandButton1_Click()

With Me.MultiPage1
.Pages(0).Visible = False
.Pages(1).Visible = False
.Pages(2).Visible = False
.Pages(3).Visible = True
.Value = 3
End With

End Sub


Private Sub CommandButton2_Click()

With Me.MultiPage1
.Pages(0).Visible = True
.Pages(1).Visible = True
.Pages(2).Visible = True
.Pages(3).Visible = False
.Value = 2
End With

End Sub
 
J

Jeffery B Paarsa

Thanks...
--
Jeff B Paarsa


Jean-Guy Marcil said:
Instead of using a checkbox, I would use a CommandButton. Otherwise, you
have to handle the fact that the checkbox will remain checked...

I would display the fourth page and hide the other 3. This fourth page would
have a button to return to the other 3 pages once we are done with it. The
code for the two buttons would be something like (Note that the Pages
collection in a MultiPage object are index at 0):

Private Sub CommandButton1_Click()

With Me.MultiPage1
.Pages(0).Visible = False
.Pages(1).Visible = False
.Pages(2).Visible = False
.Pages(3).Visible = True
.Value = 3
End With

End Sub


Private Sub CommandButton2_Click()

With Me.MultiPage1
.Pages(0).Visible = True
.Pages(1).Visible = True
.Pages(2).Visible = True
.Pages(3).Visible = False
.Value = 2
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top