Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How come my 'move' won't work???

Status
Not open for further replies.

Cndn

Programmer
Nov 22, 2001
22
0
0
CA
I know that this is a very basic question, but for some reason my code for moving things isn't working how it's supposed to! Will you just quickly give me some examples so I can understand what I'm doing wrong.

Example #1: How would I move an object up 150 units?

Example #2: How would I move an object down 150 units?

Example #3: How would I move an object right 150 units, and down 150 units?
 
Private Sub Command1_Click()
'Example #1: How would I move an object up 150 units?
With Command1
.Move .Left, .Top - 150
MsgBox "move up 150"
'Example #2: How would I move an object down 150 units?
.Move .Left, .Top + 150
MsgBox "move down 150"
'Example #3: How would I move an object right 150 units, and down 150 units?
.Move .Left + 150, .Top + 150
MsgBox "move right & down 150"
End With
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top