You're probably referencing the wrong shape, or your not running the
macro after the shape has been adjusted. For example, if your shape is
not the #2 shape, then Shapes(2) won't give you the right rotation. You
might want to give the shape a name and use that instead of the number
(see Example 8.7 on my site for naming shapes).
The other issue I mentioned was running the macro. Note the macros don't
necessarily run themselves so you have to figure out when you want to
trigger the macro to update the label.
--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
=?Utf-8?B?UGV0ZXJN?= <(E-Mail Removed)> wrote in
news:0C32AFF5-7063-43D9-B4B8-(E-Mail Removed):
> Sorry David I just tried it and it only showed 0 is there away to have
> it update say with the degrees of rotation.
> Cheers
>
> "PeterM" wrote:
>
>> Thank you very much David thats what I needed.
>> cheers
>>
>>
>> "David M. Marcovitz" wrote:
>>
>> > Items from the control toolbox are referenced in VBA via their
>> > slide numbers. For example, the first label you add to slide 7 will
>> > be referenced via Slide7.Label1
>> >
>> > The content of the label is the Caption. You can change teh caption
>> > with Slide7.Label1.Caption = "Whatever you want"
>> >
>> > Next, you need to get the rotation of your Oval, which can be done
>> > something like this:
>> >
>> > Slide7.Label1.Caption =
>> > ActivePresentation.Slides(7).Shapes(2).Rotation
>> >
>> > assuming that your oval is shape #2 on slide 7.
>> >
>> > --David
>> > --
>> > David M. Marcovitz
>> > Microsoft PowerPoint MVP
>> > Director of Graduate Programs in Educational Technology
>> > Loyola College in Maryland
>> > Author of _Powerful PowerPoint for Educators_
>> > http://www.PowerfulPowerPoint.com/
>> >
>> > =?Utf-8?B?UGV0ZXJN?= <(E-Mail Removed)> wrote in
>> > news:2D134C3B-9E21-4A0B-B144-(E-Mail Removed):
>> >
>> > > Hi .
>> > > If I have a label on a slide how can i reference it in vba.
>> > > Eg an oval on a slide rotates how do i get the label to give its
>> > > rotation?
>> > >
>> > >
>> >
>> >
>