Re: Reference Controls on a Slide
- From: Steve Rindsberg <abuse@xxxxxxxxxxxxx>
- Date: Fri, 16 Jun 2006 10:35:17 EDT
In article <1150428518.515527.60710@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, FireGeek
wrote:
I am looking for a way to reference controls on any particular slide in
PowerPoint. For example, I would like to place check boxes on a slide
and depending on which check box is checked, I would like a label to
become visible with text in it. I am planning on having several slides
to function in this manner so I need to know how I can reference these
check boxes on a particular slide.
Simplest thing is to give each shape a name. Then for a shape on, say, slide
12 you can do [aircode]:
Dim oSh as Shape
Set oSh = ActivePresentation.Slides(12).Shapes("MyShapeName")
' and to change its value, assuming it's a checkbox
oSh.OLEFormat.Object.Value = False
' and set its Visible property to false to if you like
To name a shape manually, select it then run:
ActiveWindow.Selection.ShapeRange(1).Name = "whatever you like here"
By giving the shape easily identifiable names (ie, all checkboxes start with
"chk"), you could do something like:
Dim oSl as Slide
Dim oSh as Shape
For Each oSl in ActivePresentation.Slides
For Each oSh in oSl.Shapes
If Left$(oSh.Name,3) = "chk" Then
' it's a checkbox, do your thing
End If
Next
Next
Also, how can I alter the properties of these check boxes at the
beginning of the Power Point slide show? For example, I need to
reference all check boxes and make sure their values are set to false
and the associated labels are invisible.
Any assistance would be greatly appreciated.
Thanks,
Tammy
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
.
- Follow-Ups:
- Re: Reference Controls on a Slide
- From: FireGeek
- Re: Reference Controls on a Slide
- References:
- Reference Controls on a Slide
- From: FireGeek
- Reference Controls on a Slide
- Prev by Date: Re: file menu
- Next by Date: Re: package for CD does not show up in my ppt 2003
- Previous by thread: Reference Controls on a Slide
- Next by thread: Re: Reference Controls on a Slide
- Index(es):
Relevant Pages
|