ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Trying To Store Shapes/Objects to an array ?? (https://www.excelbanter.com/excel-programming/311107-trying-store-shapes-objects-array.html)

Dan Thompson

Trying To Store Shapes/Objects to an array ??
 
My question relates more to powerpoint so I apologize for posting it here
its just that there is no powerpoint vba programing news group available
that I could find, and as my question pertains more realy to vba I figured I
would post here.

I am trying to have vba go through multiple slides and copy the objects from
each slide into elements of an array so that I can use vba to call the shapes
stored in my object array programaticly.

here is the code I have have tried but I keep getting an error.

Sub Test()
Dim MyObj(54) As Object
Dim X As Integer
For X = 1 To 54
With Presentations(1).Slides(X)
.Select
.Shapes(1).Select
End With
ActiveWindow.Selection.Copy
Set MyObj(X) = MyObj(X).GetFromClipboard(1) 'This is the line I am
getting errors
Next X
End Sub

Now I relize that the "GetFromClipboard" Method probably only works for data
stored on the windows clipboard. Is there another method that will do the
same thing as "GetFromCipboard" Method ?, but for objects like PowerPoint
shapes or pictures ?

Any Ideas out there would be most welcom

Thanks
Dan Thompson.





All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com