This might help you on your way.
Play something.
Option Explicit
Public com1left, com1top, com1width, com1height, com2left, com2top, com2width, com2height
Private Sub CommandButton1_Click()
CommandButton1.Move com1left, 10, com1width, com1height
CommandButton2.Move com2height, com2left, com2top, com2width
CommandButton2.WordWrap = True
End Sub
Private Sub CommandButton2_Click()
CommandButton2.Move com2left, 10, com2width, com2height
CommandButton1.Move com2height, com2left, com2top, com2width
CommandButton1.WordWrap = True
End Sub
Private Sub UserForm_Activate()
'setting position of each Commandbutton
com1left = CommandButton1.Left
com1top = CommandButton1.Top
com1width = CommandButton1.Width
com1height = CommandButton1.Height
com2left = CommandButton2.Left
com2top = CommandButton2.Top
com2width = CommandButton2.Width
com2height = CommandButton2.Height
End Sub
Bookmarks