Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default ?? MultiPage Cancel/Next/Previous/Finish Command Buttons ??

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default ?? MultiPage Cancel/Next/Previous/Finish Command Buttons ??

Thanks for the reply Bob.
That works a treat but I have to change tabs on the multichange for it
to change to what should be showing, so taking a logical guess I have
to set set state of the multipage (ie tab1) and the state of which
buttons I want visible before I show the userform...correct ?
and do I do this using a ....
Private Sub UserForm_Initialize()

One last thing.....can you explain what the ' Me ' is. I've seen it a
lot and to be honest have never done a search in this forum on ' Me ' .
Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default ?? MultiPage Cancel/Next/Previous/Finish Command Buttons ??

Yes, but I gave you that although I did it in the Activate event, not
Initialize, but both work.

--
HTH

Bob Phillips

wrote in message
oups.com...
Thanks for the reply Bob.
That works a treat but I have to change tabs on the multichange for it
to change to what should be showing, so taking a logical guess I have
to set set state of the multipage (ie tab1) and the state of which
buttons I want visible before I show the userform...correct ?
and do I do this using a ....
Private Sub UserForm_Initialize()

One last thing.....can you explain what the ' Me ' is. I've seen it a
lot and to be honest have never done a search in this forum on ' Me ' .
Thanks for your help.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to cancel a cut command connected to arrow down thea Excel Discussion (Misc queries) 0 February 13th 07 09:46 PM
Syntax Problem : Grouping Buttons On A Multipage [email protected] Excel Programming 2 May 27th 05 08:00 AM
Create Next and Previous Buttons on Userform nrage21[_67_] Excel Programming 3 September 17th 04 04:34 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM
Cancel buttons in Msgbox Patrick Molloy Excel Programming 0 September 19th 03 07:59 AM


All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"