Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Multipage (wizard)

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Multipage (wizard)

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Multipage (wizard)

Thanks Patrick but I don't want the users use of the OB to be the 'trigger'
but the use of a 'Next' button as there is addtional info on the page.

"Patrick Molloy" wrote:

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Multipage (wizard)

Option Explicit

Private Sub CommandButton1_Click()
If OptionButton1 Then
MultiPage1.Value = 2
ElseIf OptionButton2 Then
MultiPage1.Value = 3
Else
MsgBox "Please select an option"
End If
End Sub

"Topher" wrote:

Thanks Patrick but I don't want the users use of the OB to be the 'trigger'
but the use of a 'Next' button as there is addtional info on the page.

"Patrick Molloy" wrote:

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Multipage (wizard)

OR

Option Explicit
Private Sub CommandButton1_Click()
Select Case True
Case OptionButton1
MultiPage1.Value = 2
Case OptionButton2
MultiPage1.Value = 3
Case Else
MsgBox "Please select an option"
End Select
End Sub

"Patrick Molloy" wrote:

Option Explicit

Private Sub CommandButton1_Click()
If OptionButton1 Then
MultiPage1.Value = 2
ElseIf OptionButton2 Then
MultiPage1.Value = 3
Else
MsgBox "Please select an option"
End If
End Sub

"Topher" wrote:

Thanks Patrick but I don't want the users use of the OB to be the 'trigger'
but the use of a 'Next' button as there is addtional info on the page.

"Patrick Molloy" wrote:

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Multipage (wizard)

How do I loop this until one of the OBs is selected or the Cancel button is
pressed?

"Patrick Molloy" wrote:

OR

Option Explicit
Private Sub CommandButton1_Click()
Select Case True
Case OptionButton1
MultiPage1.Value = 2
Case OptionButton2
MultiPage1.Value = 3
Case Else
MsgBox "Please select an option"
End Select
End Sub

"Patrick Molloy" wrote:

Option Explicit

Private Sub CommandButton1_Click()
If OptionButton1 Then
MultiPage1.Value = 2
ElseIf OptionButton2 Then
MultiPage1.Value = 3
Else
MsgBox "Please select an option"
End If
End Sub

"Topher" wrote:

Thanks Patrick but I don't want the users use of the OB to be the 'trigger'
but the use of a 'Next' button as there is addtional info on the page.

"Patrick Molloy" wrote:

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Multipage (wizard)

you don't need to loop. once the user clicks an option they need to press
NEXT again. Nothing happens when they click NEXT unless one of the options is
true
OR do what my first code did and go to one of the pages as soon as they
select the option.

"Topher" wrote:

How do I loop this until one of the OBs is selected or the Cancel button is
pressed?

"Patrick Molloy" wrote:

OR

Option Explicit
Private Sub CommandButton1_Click()
Select Case True
Case OptionButton1
MultiPage1.Value = 2
Case OptionButton2
MultiPage1.Value = 3
Case Else
MsgBox "Please select an option"
End Select
End Sub

"Patrick Molloy" wrote:

Option Explicit

Private Sub CommandButton1_Click()
If OptionButton1 Then
MultiPage1.Value = 2
ElseIf OptionButton2 Then
MultiPage1.Value = 3
Else
MsgBox "Please select an option"
End If
End Sub

"Topher" wrote:

Thanks Patrick but I don't want the users use of the OB to be the 'trigger'
but the use of a 'Next' button as there is addtional info on the page.

"Patrick Molloy" wrote:

Private Sub OptionButton1_Click()
MultiPage1.Value = 2
End Sub

Private Sub OptionButton2_Click()
MultiPage1.Value = 3
End Sub

"Topher" wrote:

I am creating a 'wizard' type user form using multiforms. What I would like
to do is ask a question and then depending on the answer go to the next
appropriate page on the multiform. Example:

Is it Red? (option button)
Is it Blue? (option button)

When pressing the next button, if the OB for red is chosen go to page 3, if
OB for blue then go to page 4, if not OB chosen then msg 'you must choose'

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
Multipage for a Wizard steve Excel Programming 3 March 20th 08 09:36 PM
multipage AManso Excel Programming 2 December 4th 07 03:06 PM
How do I use multipage Lawrence M Watt Excel Discussion (Misc queries) 1 October 24th 05 02:55 PM
Allow the use of the fx wizard within the fx wizard for nesting Ron Excel Worksheet Functions 1 October 2nd 05 08:58 PM
MultiPage Michael[_25_] Excel Programming 3 January 6th 04 12:49 PM


All times are GMT +1. The time now is 08:31 PM.

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

About Us

"It's about Microsoft Excel"