Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Set Label.Caption in a PowerPoint Presentation

Posted on 2003-03-08
5
Medium Priority
?
2,473 Views
Last Modified: 2008-02-26
Hi and a good evening.
My Question :
How can I set a Label.Caption in a Powerpoint Presentation with a Visual Basic Program?
I have tried this:
Dim Lab1 As Label
Set Lab1 = ActivePresentation.Slides(1).Shapes(2).OLEFormat.Object
With Lab1
.Caption= Text1.Text
End With
Yes sure I have open before the Presentation!

But it doesn't work.

Thanks for answer.
0
Comment
Question by:BraveNewWorld
5 Comments
 
LVL 5

Expert Comment

by:JohnMcCann
ID: 8095661
   With ActivePresentation.Slides(1).Shapes(1)
        .HasTextFrame = True
        .TextFrame.TextRange.Text = "Hello"
    End With
0
 

Author Comment

by:BraveNewWorld
ID: 8097563
Hi.
First thanks for your reply.
I mean an ActiveX Label from the Toolbox. Not a TextFrame.
The Presentation has no TextFrame. Only 4 Labels.This 4 Label Captions I want set over a Visual-Basic Program.
Thanks
0
 
LVL 5

Accepted Solution

by:
JohnMcCann earned 500 total points
ID: 8097696
Ok try

ActivePresentation.Slides(1).label1.Caption ="Changed the caption"
0
 

Expert Comment

by:CleanupPing
ID: 8900469
BraveNewWorld:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9074482
Moderator, my recommended disposition is:

    Accept JohnMcCann's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

578 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