JustinStarry
New Member
- Joined
- Aug 18, 2010
- Messages
- 14
Hey all, I have an interesting problem for you...
I have assigned a macro to a key...
And this works fine, but...
I need to have an endless loop running constantly without losing the functionality of the assigned key.
However, nothing happens when I press the assigned key while the loop is running.
Does anyone have any suggestions?
I have assigned a macro to a key...
Code:
Sub AssignKey()
Application.Onkey "~", Increment
End Sub
Code:
Sub Increment()
Range("A1").value = Range("A1").value + 1
End Sub
And this works fine, but...
I need to have an endless loop running constantly without losing the functionality of the assigned key.
Code:
Sub EndlessLoop()
Do
DoEvents 'Does NOT work
Loop Until False
End Sub
However, nothing happens when I press the assigned key while the loop is running.
Does anyone have any suggestions?