got it with a circle!
OK, so I figured out how to make it work in a circle instead of just a line. You have to specify the size of the circle that you want to rotate the object around. In my macro, I have the circle on the slide, so I just name it.
OK, here it is:
Sub finalmove()
Dim sld As Slide
Dim wheel As Shape
Dim aro As Shape
Dim n As Integer
Dim pi As Double, angl As Double
pi = 3.14159265358979
Set sld = ActivePresentation.Slides(5) 'slide objects are on
Set wheel = sld.Shapes("Group 8") 'the circle of rotation
whcenx = wheel.Left + wheel.Width / 2 'the center of the circle
whceny = wheel.Top + wheel.Height / 2
rad = wheel.Width / 2 'radius of the circle
Set aro = sld.Shapes("Left Arrow 10") ' object being rotated/circulated
n = 52 'number of moves/spokes
angl = 2 * pi / n
For i = 1 To n
aro.Left = whcenx - (rad * Sin(angl * i)) - aro.Width / 2
aro.Top = whceny + (rad * Cos(angl * i)) - aro.Height / 2
aro.Rotation = aro.Rotation + (360 / n)
DoEvents
Next i
End Sub
Let me know if this works, hopefully it is not too late.
Math Nerd
Last edited by jsmath22; 12-22-2010 at 04:47 AM.
|