Microsoft Office Tutorials and References
In Depth Information
Moving Shapes and Graphics During Presentation
'This string is dimmed outside of the subs _¶
so that the variable will remain in force _¶
between subs¶
Dim varShapeName As String¶
' * * * * *¶
Private Sub SpinButton1_SpinDown()¶
'Identify which shape is to be modified.¶
With ActivePresentation.Slides(1).Shapes(varShapeName)¶
'Shift the object a little to the left by moving¶
'its placement, but only if it will not run off¶
'the screen.¶
If .Left > 0 Then .Left = .Left - 5¶
End With¶
End Sub¶
' * * * * *¶
Private Sub SpinButton1_SpinUp()¶
With ActivePresentation.Slides(1).Shapes(varShapeName)¶
'Shift the object a little to the left by moving¶
'its placement, but only if it will not run off¶
'the screen.¶
If .Left < SlideShowWindows(1).Width - .Width Then .Left =
.Left + 5¶
End With¶
End Sub¶
' * * * * *¶
Private Sub SpinButton2_SpinUp()¶
With ActivePresentation.Slides(1).Shapes(varShapeName)¶
'When this is activated, the object moves up¶
'towards the top of the screen¶
If .Top > 0 Then .Top = .Top - 5¶
End With¶
End Sub¶
' * * * * *¶
Private Sub SpinButton2_SpinDown()¶
With ActivePresentation.Slides(1).Shapes(varShapeName)¶
'And down, but not off the bottom¶
If .Top < SlideShowWindows(1).Height - .Height Then .Top = .Top
+ 5¶
End With¶
End Sub¶
' * * * * *¶
Sub SpinCCW()¶
With ActivePresentation.Slides(1).Shapes(varShapeName)¶
'Because the rotation will reset if less than zero _¶
'to its positive counter part, we do not have to _¶
'stipulate conditions on the rotation. In this _¶
'case counter-clockwise¶
.Rotation = .Rotation - 1¶
End With¶
End Sub¶
Pwr
Search JabSto ::




Custom Search