RE: Multipage/Multitab user form by JeanGuyMarcil
JeanGuyMarcil
Thu Sep 18 12:42:01 PDT 2008
"Jeffery B Paarsa" wrote:
> 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