Moving shapes

F

Francis Hookam

Any idea why the following toggles back and forth nicely on Mac XL 2001 and
not on PC XL 2000

On the PC the shape moves once to the 100x100 position and then does not
budge - it is the same file on two different machines!

Is there a better way - I was trying to avoid actually selecting the group
and then clicking elsewhere after the move to de-select the group

(The shape is a group of buttons, one of which is this toggle. It is helpful
to be able to move the group out of the way and later bring them back. It
seems better to have a recognisable button do this than for an unwary user
trying grab the group and drag it out of the way)

Sub MoveButtons()
If ActiveSheet.Shapes("ButtonGroup").Top = 100 Then
With ActiveSheet.Shapes("ButtonGroup")
.Top = 40
.Left = 40
End With
Else
With ActiveSheet.Shapes("ButtonGroup")
.Top = 100

.Left = 100
End With
End If
End Sub

Many thanks

Francis Hookham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top