Multipage - Select next page.

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?
 
R

Ron de Bruin

Hi Gojavid

You must set the value to change the page

MultiPage1.Value = 1 for the second page (0= page 1)
 
B

Bernie Deitrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top