David Quetglas
David Quetglas

Reputation: 87

Multipage UserForm Excel - Add Next Button

Is it possible to add a button on page one on a Userform with multipages so that it will take you to the other pages? Can sopmeone post a simple code for that?

Upvotes: 2

Views: 1419

Answers (1)

cyboashu
cyboashu

Reputation: 10433

Value property of the MultiPage Control, sets/gets the active page.


enter image description here

 Private Sub cmdNext_Click()
        Dim lCurrentPage As Long

        lCurrentPage = Me.MultiPage1.Value + 1

        If lCurrentPage = Me.MultiPage1.Pages.Count Then
            MsgBox "You are on the last page."
        Else
            Me.MultiPage1.Value = lCurrentPage
        End If

    End Sub

Upvotes: 1

Related Questions