Exposian
04-29-2015, 10:43 AM
Hello All!
Hoping there is an expert out there who has the answer...
I have a piece of code (below) that position a selected shape to a given position on a click of a button.
What I would like to do (Not sure if it can be done) is to have multiple positions sequence for the selected shape then a loop with the same button.
For example:
I click the button once, then the shape moves to .Top = 100
I click the button again, then the shape moves to .Top = 250
I click the button again, then the shape moves to .Top = 300
I click the button again then it loops back up to moves to .Top = 100
And so on...
Is that do-able? I do not want to use increment as the positions are all different...
Hope someone can help on that one!
Best regards,
Philippe
Sub MoveMe()
Dim o As Shape, b As Boolean
Set o = ActiveWindow.Selection.ShapeRange(1)
If Not o Is Nothing Then
With o
.Top = 359.1945
End With
End If
Exit Sub
End Sub
Hoping there is an expert out there who has the answer...
I have a piece of code (below) that position a selected shape to a given position on a click of a button.
What I would like to do (Not sure if it can be done) is to have multiple positions sequence for the selected shape then a loop with the same button.
For example:
I click the button once, then the shape moves to .Top = 100
I click the button again, then the shape moves to .Top = 250
I click the button again, then the shape moves to .Top = 300
I click the button again then it loops back up to moves to .Top = 100
And so on...
Is that do-able? I do not want to use increment as the positions are all different...
Hope someone can help on that one!
Best regards,
Philippe
Sub MoveMe()
Dim o As Shape, b As Boolean
Set o = ActiveWindow.Selection.ShapeRange(1)
If Not o Is Nothing Then
With o
.Top = 359.1945
End With
End If
Exit Sub
End Sub