1
votes

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
AFAIK you cannot do this using properties of the multipage. You could fake it by hiding the tabs and replacing them with buttons? - jkpieterse

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