DixiePiper
New Member
- Joined
- Oct 19, 2015
- Messages
- 41
- Office Version
- 365
- Platform
- Windows
I've searched around and either I'm asking the question wrong or there actually isn't an available solution.
On page 2 of a 5 page Multipage userform, I have an option button that, when selected, causes the next page of the multipage to be hidden. Everything is working swimmingly with the exception of the navigation. Outside the Multipage, on the userform, I have "cancel", "back", "next", and "finish" buttons to control movement through the form. With page 3 hidden, I cannot seem to navigate back from page 4 to page 2. Everything with my navigation was working until I needed to modify the form to hide a page.
The script I'm using for the "Back" button is:
The extra piece is the "Update Controls" script which works just fine
As a note, I'm working in Microsoft 365, so whatever version of Excel that is. I have no real programming background and have learned what I know from the Great Google and the help of message boards, etc. Thanks in advance for any help.
On page 2 of a 5 page Multipage userform, I have an option button that, when selected, causes the next page of the multipage to be hidden. Everything is working swimmingly with the exception of the navigation. Outside the Multipage, on the userform, I have "cancel", "back", "next", and "finish" buttons to control movement through the form. With page 3 hidden, I cannot seem to navigate back from page 4 to page 2. Everything with my navigation was working until I needed to modify the form to hide a page.
The script I'm using for the "Back" button is:
Code:
Private Sub cmdBack_Click()
mpData.value = mpData.value - 1
Select Case mpData.value
Case 0
txtTORFQ.SetFocus
Case 1
optBaseNo.SetFocus
Case 2
txtBaseOn1.SetFocus
Case 3
cmdGSelectAll.SetFocus
End Select
UpdateControls
End Sub
The extra piece is the "Update Controls" script which works just fine
Code:
Sub UpdateControls()
Select Case mpData.value
Case 0
cmdBack.Enabled = False
cmdNext.Enabled = True
cmdFinish.Enabled = False
Case 1
cmdBack.Enabled = True
cmdNext.Enabled = True
cmdFinish.Enabled = False
Case 2
cmdBack.Enabled = True
cmdNext.Enabled = True
cmdFinish.Enabled = False
Case 3
cmdBack.Enabled = True
cmdNext.Enabled = True
cmdFinish.Enabled = False
Case 4
cmdBack.Enabled = True
cmdNext.Enabled = False
cmdFinish.Enabled = True
End Select
Me.Caption = AppName & " Step " _
& mpData.value + 1 & " of " _
& mpData.Pages.Count
End Sub
As a note, I'm working in Microsoft 365, so whatever version of Excel that is. I have no real programming background and have learned what I know from the Great Google and the help of message boards, etc. Thanks in advance for any help.