Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Missing movements from kernel32?
Many Thanks in advance!
I am doing a game. My game movement comes from: 2 DLL such as: Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVa nVirtKey As Long) As Integer Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) and from this Macro: Sub Mymacro() Do Sleep 100 Select Case KeyPressed Case GetAsyncKeyState(vbKeyEscape): End 'Case GetAsyncKeyState(vbKeyDown): Move_Down Case GetAsyncKeyState(vbKeyRight): Move_Right Case GetAsyncKeyState(vbKeyUp): Mov_Change Case GetAsyncKeyState(vbKeyLeft): Move_Left Case Else: Move_Down End Select DoEvents Loop end sub my problem: 1) When my macro is running, I may move two times to the left and th macro named "Mymacro" sometimes only takes one move, so I am missin movement/s. What am I doing Wrong -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
tabbed movements | Excel Discussion (Misc queries) | |||
formula and cell link movements | Excel Worksheet Functions | |||
VBA occur error - kernel32.dll | Excel Programming | |||
KERNEL32.DLL error after running EXCEL Macro | Excel Programming |