Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Help with creating a time sampling loop

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Help with creating a time sampling loop

Courtesy of Harold in an earlier post
http://www.mvps.org/dmcritchie/excel/datetime.htm
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"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!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Help with creating a time sampling loop

On Nov 6, 11:21 am, 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!


look at help for Timer
Reply
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
Creating a loop JakeShipley2008 Excel Discussion (Misc queries) 1 September 8th 08 10:26 PM
Creating a loop Jennifer Excel Programming 11 April 6th 08 02:02 AM
Need help creating Loop Jenny B. Excel Discussion (Misc queries) 3 February 14th 07 11:26 PM
Creating a loop shart Excel Programming 10 December 21st 05 08:24 AM
Creating a loop Ibuprofen Excel Programming 1 October 26th 05 04:41 AM


All times are GMT +1. The time now is 01:45 AM.

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

About Us

"It's about Microsoft Excel"