Solved

VBA - Word, Toggle Show/hide Multipages in Userform

Posted on 2015-01-07
7
377 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 51

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 51

Expert Comment

by:Rgonzo1971
ID: 40535709
No file
0
Office 365 Training for Admins - 7 Day Trial

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 51

Accepted Solution

by:
Rgonzo1971 earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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