Magnicco
Magnicco

Reputation: 45

Change User Form Page in VBA Form

Good morning!

I have an User Form in VBA Excel with multiple Pages.

I want to create a command button ("Next" button) that allow the user to change the page. What code should I use?

Upvotes: 1

Views: 2406

Answers (1)

R3uK
R3uK

Reputation: 14547

This should do the trick :

If Me.MultiPage1.SelectedItem.Index<>Me.MultiPage1.Pages.Count Then
    Me.MultiPage1.Value = Me.MultiPage1.SelectedItem.Index + 1
Else
    Me.MultiPage1.Value = 0
End If

Upvotes: 2

Related Questions