This is the sub I have. When a command button is pressed, this runs. WBut, when I push it, my program freezes(as well as VB). Same thing happened with Zaei's code.

Code:
Public Sub Run()
Dim T As Long
    Do Until DONE = True
        T = GetTickCount + 30
        If GetTickCount >= T Then
            MouseMove
            DoEvents
       End If
    Loop

End Sub