Solved

Bringing forward text boxes in powerpoint

Posted on 2011-02-28
7
484 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
[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
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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction I recently received a question about the creation of Computer-Based Training (CBT) that incorporates quizzes in the middle of the lesson. The intent was to keep people engaged in the content, and not to actually track students’ scores.…
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…
This video teaches viewers how to add simple and professional themes to their slides.
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.

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