Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA - Word, Toggle Show/hide Multipages in Userform

Posted on 2015-01-07
7
Medium Priority
?
431 Views
Last Modified: 2015-01-07
Hi guys,

I'm quite new at VBA, and working on a big project with a word document and vba.

I need some help with being able to toggle a multipage show/hide. I have gotten this far that i'm able to toggle it to show but not the other way around.

please help,

this is the code i'm using:

Me.MultiPage1.Pages(2).Visible = True

Open in new window

0
Comment
Question by:Hakum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 40535685
Hi

if you want to hide the second page do use 1 (zero based)

Me.MultiPage1.Pages(1).Visible = False

Regards
0
 
LVL 1

Author Comment

by:Hakum
ID: 40535706
I want to unhide the 3rd and onwards pages depending on if its checked in diffrent checkboxs on page 2

View the attachment for the doc im working with at the moment
0
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 40535709
No file
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 1

Author Comment

by:Hakum
ID: 40535711
0
 
LVL 1

Author Comment

by:Hakum
ID: 40535719
try now :) something went wrong
0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 40535733
Hi,

pls try

Private Sub CheckBox14_Click()

'On/Off Toggle
Dim ctrl As Control

    For Each ctrl In Me.Frame15.Controls
        ctrl.Enabled = Not (ctrl.Enabled)
    Next

Me.MultiPage1.Pages(2).Visible = CheckBox14.Value

End Sub

Open in new window

And so on...

Regards
0
 
LVL 1

Author Closing Comment

by:Hakum
ID: 40535751
YOU ROCK!!! THANKS A TON!! :D
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question