Multipage - Select next page.

  • Thread starter Thread starter Gojavid
  • Start date Start date
G

Gojavid

I have a form with a multipage with pages names page1, page2, etc...
and I have a button on the form that makes the next page visible if
information is entered onto the first page. Is there code to make
page2 as the focus when the button is pushed.

I have code:

Dim page2 As Object
Set page2 = MultiPage1.page2

If page1.visible = False And ComboBox1 <> "" Then
page2.visible = True

currently all it does is add the page, it doesn't change the focus
from page1


I'm looking for something like this...

Dim page2 As Object
Set page2 = MultiPage1.page2

If page1.visible = False And ComboBox1 <> "" Then
page2.visible = True
??page2.activate??


Any ideas?
 
Hi Gojavid

You must set the value to change the page

MultiPage1.Value = 1 for the second page (0= page 1)
 
You set the value to the page number less one, of the page you want to show. Or you can increment
the value to show the next page:

UserformName.MultiPage1.Value = UserformName.MultiPage1.Value + 1

HTH,
Bernie
MS Excel MVP
 
Back
Top