How can I make a picture slide across the form in VBA. It can be pre-programmed or random what ever is easier. I need to be able to see it move at any given speed.
Thanks for your support.
Thanks for your support.
Private Sub Timer1_Timer()
Picture1.Move Picture1.Left + 15
End Sub
Private Sub Timer1_Timer()
Picture1.Move Picture1.Left + 15, Picture1.Top - 15
End Sub
Private Sub Timer1_Timer()
Picture1.Move Picture1.Left + 15
End Sub
Private Sub Timer1_Timer()
Picture1.Move Picture1.Left + 15, Picture1.Top - 15
End Sub
Sub ShapeMover()
Image1.Left = Image1.Left + 6
Application.OnTime When:=Now + TimeValue("00:00:01"), Name:="ShapeMover"
End Sub
Sub ShapeMover()
Image1.Left = Image1.Left + 6
Application.OnTime When:=Now + TimeValue("00:00:01"), Name:="ShapeMover"
End Sub
Private I As Integer Private Mode As Integer
Private Sub Command1_Click()
Mode = Not Mode
If Mode = -1 Then Call PicMove
End Sub
Private Sub PicMove()
If Mode = -1 Then
Do
Do
I = I + 1
Loop Until I = 10000
I = 0
Picture1.Move Picture1.Left + 1
DoEvents
Loop Until Mode = 0
End If
End Sub
Private I As Integer Private Mode As Integer
Private Sub Command1_Click()
Mode = Not Mode
If Mode = -1 Then Call PicMove
End Sub
Private Sub PicMove()
If Mode = -1 Then
Do
Do
I = I + 1
Loop Until I = 10000
I = 0
Picture1.Move Picture1.Left + 1
DoEvents
Loop Until Mode = 0
End If
End Sub
Comment