I have a user form with multipage. I would like to have the tabs of a multipage visible on top, so the user knows on which page he is and how many there are left. But I would like to disable the possibility to jump between the tabs by pressing on the tab name. Instead only next and back buttons would be available to navigate between the pages. Is it possible just by using the properties, or do I have to write the code for the mulipage change?
1
votes
1 Answers
0
votes
create form with one multipage control
then add this code ... click form background to see result
Private Sub UserForm_Click()
If UserForm1.MultiPage1.Pages(0).Enabled Then
UserForm1.MultiPage1.Pages(1).Enabled = True ' must always have at least one enabled
UserForm1.MultiPage1.Pages(0).Enabled = False ' otherwise it looks bad
Else
UserForm1.MultiPage1.Pages(0).Enabled = True ' reverse statements, and you will see
UserForm1.MultiPage1.Pages(1).Enabled = False
End If
End Sub