VBA - Word, Userform, multipage control buttons

Hi guys,

I need some help figuring out how to use/create control button to go to next active multipage.

Please see the sample file for my example of the setup i have ( it wasn't possible to upload the docm file there for in doc format ).

Capture.JPG
The checkbox variate from time to time. So what i'm looking for is a "Next" button that will goto the next active the multipages.

Kindly advise.
multipage-sample.doc
LVL 1
HakumAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try

Private Sub cbMultipage1_Next()
Me.MultiPage1.Value = Me.MultiPage1.Value + 1
End Sub

Open in new window


You will have to check if the button is at the last page ( for next) to disable it

Regards
HakumAuthor Commented:
Hi thank you for the answer, i'm still learning so sorry but i did not quite understand..

I'm guessing that "cbMultipage1_Next" is a button? and will this only work for multipage 1? and what about the other multipages? is it possible create one button for all multi pages? and where should the next button be?
Rgonzo1971Commented:
HI,

you could insert these 2 buttons outside the multipage

Private Sub cbMultipage1Next_Click()

For Idx = Me.MultiPage1.Value + 1 To Me.MultiPage1.Pages.Count - 1
    If Me.MultiPage1.Pages(Idx).Visible Then
        Me.MultiPage1.Value = Idx
        Exit For
    End If
Next
End Sub

Private Sub cbMultipage1Prev_Click()
For Idx = Me.MultiPage1.Value - 1 To 0 Step -1
    If Me.MultiPage1.Pages(Idx).Visible Then
        Me.MultiPage1.Value = Idx
        Exit For
    End If
Next
End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HakumAuthor Commented:
Work like a charm! thank you soo much!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.