-
ActiveX Controls... Another Question!
In other post: ../showthread.php?t=19916 I discover how to loop through the ActiveX controls (option buttons, checkboxes,...) in one presentation.
[vba]Private Sub CommandButton1_Click()
Dim sldTemp As Slide
For Each sldTemp In ActivePresentation.Slides
Dim shpTemp As Shape
For Each shpTemp In sldTemp.Shapes
If shpTemp.Type = msoOLEControlObject Then
If TypeName(shpTemp.OLEFormat.Object) = "CheckBox" Then
shpTemp.OLEFormat.Object.Value = False
End If
End If
Next
Next
End Sub[/vba] Now, I need to know, how can I access a specific control using his "name property". Here is a Excel VBA code that uses a similar idea.
[vba]
For i = 1 To 4
strAcell = "a" & i
strBcell = "b" & i
strCcell = "c" & i
strDcell = "d" & i
'...
ograph.Application.DataSheet.Range(strAcell).Value = 20 * i
ograph.Application.DataSheet.Range(strBcell).Value = 20 * i
ograph.Application.DataSheet.Range(strCcell).Value = 20 * i
ograph.Application.DataSheet.Range(strDcell).Value = 20 * i
'...
Next i[/vba]
Thanks, Messinho
~Cleaned up post. Please don't nest board tags inside VBA tags
Regards, Oorang
-
If you know the shapes name then you can use
[vba]
Activepresentation.slides(1).shapes("Name").???
[/vba]
Where "Name" is the name of the control and ??? is properties of the shape.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules