Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBA - Word, Toggle Show/hide Multipages in Userform

Posted on 2015-01-07
7
Medium Priority
?
471 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
  • 4
  • 3
7 Comments
 
LVL 53

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 53

Expert Comment

by:Rgonzo1971
ID: 40535709
No file
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:Hakum
ID: 40535711
0
 
LVL 1

Author Comment

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

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

972 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