View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Steve Steve is offline
external usenet poster
 
Posts: 1,814
Default Multipage for a Wizard

Dave,

Thanks, but that's not exactly what I'm looking for. I want all the tabs to
be visible to the user, I just don't want him to be able to change the page
by selecting a tab. I want to force him to use the Wizard controls on the
form.

thanks,
Steve

"Dave Peterson" wrote:

You can use the .visible property to hide/show pages.

I create a small userform with a multipage control with a few pages. And a
button to advance and another button to retreat.

Option Explicit
Private Sub CommandButton1_Click()
With Me.MultiPage1
If .Value = .Pages.Count - 1 Then
Beep
Else
.Pages(.Value + 1).Visible = True
.Pages(.Value).Visible = False
End If
End With
End Sub
Private Sub CommandButton2_Click()
With Me.MultiPage1
If .Value = 0 Then
Beep
Else
.Pages(.Value - 1).Visible = True
.Pages(.Value).Visible = False
End If
End With
End Sub
Private Sub UserForm_Initialize()
Dim iCtr As Long
With Me.MultiPage1
.Value = 0 'first sheet
For iCtr = 1 To .Pages.Count - 1
.Pages(iCtr).Visible = False
Next iCtr
End With
Me.CommandButton1.Caption = "Next"
Me.CommandButton2.Caption = "Prev"
End Sub


steve wrote:

I have a wizard that is navigated using using buttons like, Back, Next, etc.
I want to show the tab strip so the user knows what steps are next, but I
don't want them to be able to click the tabs themselves to change the page.
I want them to have to use the buttons on the wizard.

If I disable the multipage, then everything's disabled. I thought of using
a public variable and checking if it's true or not, but I'm not sure what
events to use. Please help!

Thanks,
Steve


--

Dave Peterson