LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Issues with DoEvents command

For the code below, if I leave the worksheet alone, the code runs
fine. If I activate a cell by selecting it, and leave it active, the
code doesn't complete. How do I write a code which will complete the
code regardless of what is happening on the sheet?

thanks

Private Sub CommandButton1_Click()
For k = 1 To 10
Cells(k, 1) = k
Start = Timer
Do While Abs(Timer - Start) <= 1 'Waiting 1 sec
DoEvents
Loop
Cells(k, 2) = k + 1
Next
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When does DoEvents return? clara Excel Programming 1 August 28th 07 07:32 PM
DoEvents Arne Hegefors Excel Programming 4 October 19th 06 02:13 PM
VBA shell command - issues... JWM6[_2_] Excel Programming 7 April 19th 06 10:59 PM
DoEvents?? Geoff Excel Programming 4 August 18th 05 03:23 PM
Doevents Application Alex J Excel Programming 1 November 30th 03 04:31 PM


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"