View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Help with creating a time sampling loop

I put a counter on this so it could be limited to a specific number of loops
rather than run continuously until the workbook is closed. Try it out. If
it works, you can modify the counter limits or remove the counter altogether.
You can also replace the Beep line with a message box statement.

Sub wakeUp()
counter = 0
Do
s = Timer + 30
Do While Timer < s
DoEvents
If Timer = s Then Beep
Loop
counter = counter + 1
Loop Until counter = 10
End Sub






"Ben" wrote:

I am conducting observations where every 30 seconds I have to record what a
subject is doing. I have very little experience with VBA and I was wondering
if there was a way to create something where every 30 seconds either a cell
lights up or something pops up to alert me to look at what a subject is
doing. Any help would be appreciated! Thanks!