Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Don Sims   on Dec 13 In MS Office Category.

  
Question Answered By: Billy Evans   on Dec 13


I have experienced the same problem. I'm using the
the following type of syntax

Sub MainTimer()
-- TmrTime = Now + TimeValue("00:00:01")
-- Application.OnTime TmrTime, "Sheet1.MainTimer", EndTime
-- >> other code <<
End Sub

The sub constantly calls itself (once per second) until
EndTime is reached (defined elsewhere). If I begin typing
something in any cell on Sheet1, the MainTimer stops
working until I press the <enter> key. I don't have
a solution to prevent this from happening.

In the VB6 world, where everything is form-based, I've
used something like this:

Sub Form_KeyPress(KeyAscii As Integer)
-- If isBLP Then
---- Exit Sub
-- End If
-- >> other code <<
End Sub

If the variable isBLP evaluates to True, the sub is exited.
Otherwise, the keyboard  entries are processed. I'm afraid
that I don't know of a parallel in Excel when you are
"sheet-based" or "application-based".

Anyone else have any ideas?

Share: 

 

This Question has 13 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on make workbook ignore keyboard activity while timer running Or get search suggestion and latest updates.


Tagged: