Re: Macro With Timer Event

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi, Sax-
The reason you got an error is because you have "ambiguous" names for
your routines: you have 3 macros all named "Delay". You need to make
them unique, maybe Delay1, Delay2, and Delay3, or combine them all into
one routine called Delay, which I've done below.

Sub Delay()
Dim Beg As Long

Beg = Timer
Do
Loop Until Timer - Beg >= 30
Sheets("Sheet1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste

Beg = Timer
Do
Loop Until Timer - Beg >= 30
Sheets("Sheet1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet4").Select
ActiveSheet.Paste

Beg = Timer
Do
Loop Until Timer - Beg >= 30
Sheets("Sheet1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet5").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
End Sub

.



Relevant Pages

  • Timer with Micro seconds
    ... Can anyone guide me in attaining micro seconds delay in WinCE. ... I am able to find out some routines like "QueryPerformanceCounter" ... But I require a Timer at the "Application level" which can provide me ...
    (microsoft.public.windowsce.embedded)
  • Timer with Micro seconds
    ... Can anyone guide me in attaining micro seconds delay in WinCE. ... I am able to find out some routines like "QueryPerformanceCounter" ... But I require a Timer at the "Application level" which can provide me ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Lahman, how ya doing?
    ... I assume this is a delay for settling ... It's a simulation, so simulated time will be frozen until all tasks ... If, though, the timer event is only one of several ... Heat goes from the heater to thermal block 1, ...
    (comp.object)
  • RE: Timed and blinking messages
    ... Warning procedure that is located in the Userform code as well. ... Private Sub UserForm_Click ... Do While Timer < Delay ...
    (microsoft.public.excel.programming)
  • Re: Lahman, how ya doing?
    ... I assume this is a delay for settling times or something. ... If, though, the timer event is only one of several events that may be issued to complete tasks, one needs a different mechanism. ... it generates the trigger event for the next task rather than the timer. ... The Delay does it own tick counting for the interval and then issues the actual event that triggers the relevant task. ...
    (comp.object)