View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default ?? MultiPage Cancel/Next/Previous/Finish Command Buttons ??

I would create 4 buttons,not on the multipage, but on the form, overlaying
Cancel and previous, and also Next and Finish and hide and unhide them as
each page is activated.

Like this

Private Sub MultiPage1_Change()
If Me.MultiPage1.Value = 0 Then
Me.cmdCancel.Visible = True
Me.cmdPrevious.Visible = False
Me.cmdNext.Visible = True
Me.cmdFinish.Visible = False
ElseIf Me.MultiPage1.Value = 1 Then
Me.cmdCancel.Visible = False
Me.cmdPrevious.Visible = True
Me.cmdNext.Visible = False
Me.cmdFinish.Visible = True
End If
End Sub

Private Sub UserForm_Activate()
Me.cmdCancel.Visible = True
Me.cmdPrevious.Visible = False
Me.cmdNext.Visible = True
Me.cmdFinish.Visible = False
End Sub


--
HTH

Bob Phillips

wrote in message
oups.com...
What is the best way of doing this and how.
This is what I want....
MultiPage1.Value =0 Cancel Next
MultiPage1.Value =1 Previous Next
MultiPage1.Value =2 Previous Finish

Is it best to create one of each and then make then visible/invisible
for each tab ( and how do you do this)

Or is it best to generate each one on each tab seperately. If so, can
you then group all the Nexts together to write one sub that will move
to the next page rather than having to generage duplicate subs for each
button.

Both the above ways I have tried but stumble on both. 1st option I
can't get the right syntax to make visible/invisible which I am trying
to do under the MultiPage1_Change() which apparently isn't valid.
2nd option I can make a new collection of the next buttons but then
don't know how to use that group to attach to code to raise the tab
number.

Can anybody help ? Thanking you in advance.