Solved

Bringing forward text boxes in powerpoint

Posted on 2011-02-28
7
478 Views
Last Modified: 2012-05-11
I would like a series of 4 text boxes layered one on top of the other to be brought forward into view as required by clicking one of 4 action buttons.  I am trying to create the idea of 4 microsoft style tabs, which when clicked will reveal the appropriate text box.

My instinct would be to have someone design a macro and attach this to the action button such that it 'brings forward' a text page when depressed.

I am an advanced user using Powerpoint 2010.

Thank you in advance.
0
Comment
Question by:RichShare
7 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 34997244
In a running presentation then the syntax is as below ... in this case it cycles around 1 to 4 with the textbox prefix.

Chris
Static intVal

    intVal = intVal + 1
    If intVal > 4 Then intVal = 1
    Application.ActivePresentation.Slides(1).Shapes("TextBox" & intVal).ZOrder msoBringToFront

Open in new window

0
 
LVL 12

Expert Comment

by:Amick
ID: 34997390
The trick is to make separate  slides addressed by a mouseclick action tied to the tab. When you click on the tab, the slide in question loads. I've attached a very simple example.
 Tab-1.pptx
0
 

Author Comment

by:RichShare
ID: 34999238
Thank you for both suggestions.  Amick, the multiple slide will work but may get messy in the long term as it will require 4 x the number of slides, but thank you anyway.  Chris.  Where would I insert this script into powerpoint?  Is this a macro action button thing or part the text box itself?

Can you create your own custom shaped text boxes?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 34999858
For terst purposes I added a button that toggled around the boxes but as per your outline I imagine you adding 4 buttons via developer | Controls | Command Button

Right click the button you draw and select view code:  Each button would select one of the four text boxes.  You can of course use the code I posted if a single button cycling 1 ... 4 .. 1 .. 4 etc is the requirement just add the one buttton and again post the code (excluding the sub declaration and end sub statements of course) into the sub.

Chris


Private Sub CommandButton1_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox1").ZOrder msoBringToFront
    
End Sub


Private Sub CommandButton1_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox2").ZOrder msoBringToFront
    
End Sub


Private Sub CommandButton1_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox3").ZOrder msoBringToFront
    
End Sub


Private Sub CommandButton1_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox4").ZOrder msoBringToFront
    
End Sub

Open in new window

0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 250 total points
ID: 34999873
Cut and half paste!

Private Sub CommandButton1_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox1").ZOrder msoBringToFront
   
End Sub


Private Sub CommandButton2_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox2").ZOrder msoBringToFront
   
End Sub


Private Sub CommandButton3_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox3").ZOrder msoBringToFront
   
End Sub


Private Sub CommandButton4_Click()
    Application.ActivePresentation.Slides(1).Shapes("TextBox4").ZOrder msoBringToFront
   
End Sub
0
 
LVL 23

Assisted Solution

by:JSRWilson
JSRWilson earned 250 total points
ID: 35068633
You can do this with one line of code!

Download sample here
0
 

Author Closing Comment

by:RichShare
ID: 35068796
Brilliant, thank you both.  Have posted equal points, Chris solved my immediate problem, thank you.  JSRWilson - thanks for the elegant long term solution.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Background   Certain code in VBA requires initialization, such as application events. The app initialization is often triggered by the Auto_Open sub which is a special procedure that runs when an add-in loads. More significantly, this sub does n…
 Regular Expressions Microsoft Word has sophisticated search tools that can search for patterns. For example if you wanted to search for all UK phone numbers that followed a pattern of five digits, a space and then six digits you can easily do th…
This video teaches viewers how to create handouts from their slides and helps them decide how many slides to include per handout.
The viewer will learn how to edit animations within the presentation, incorporate sound, and set everything up with timing.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now