Solved

Bringing forward text boxes in powerpoint

Posted on 2011-02-28
7
481 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

People often ask "How do I make this macro run every time I show a new slide or add a new slide etc." This means making PowerPoint respond to that EVENT and, unlike in Excel, it's not that easy! First, I would avoid using the pseudo events left o…
Most folk recognise that Microsoft Excel, being a numbers-and-formulae-centric application attracts programmers due to the natural fit in mindset. Conversly, when opening Microsoft's dominant presentation creative application, few consider what…
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.
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: …

828 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